cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-780140%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3Enon%20reconnu%20comme%20argument%20de%20table%20dans%20la%20boucle%20Access%20For%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-780140%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3EJ'essaie%20de%20concat%C3%A9ner%20mes%20tables%20de%20sous-ensembles%2C%20mais%20j'obtiens%20constamment%20cette%20erreur%26nbsp%3B%3A%3CBR%20%2F%3E%20non%20reconnu%20comme%20argument%20de%20table%20dans%20l'acc%C3%A8s%20ou%20l'%C3%A9valuation%20de%20'dtSubsetList%20%5B%20%2F*%23%23%23*%2Fi%5D'%20%2C%20dtSubsetList%20%5B%2F*%23%23%23*%2Fi%5D%3C%2FP%3E%3CP%3EIm%20using%20JMP%2016%3CCODE%20class%3D%22%20language-jsl%22%3E%3C%2FCODE%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Enames%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0A%0AdtSubsetList%20%3D%20dt%20%26lt%3B%26lt%3B%20Subset(%0A%09By(%20%3Asex%20)%2C%0A%09All%20rows%2C%0A%09Selected%20columns%20only(%200%20)%2C%0A%09columns(%20%3Aname%2C%20%3Aage%2C%20%3Aheight%2C%20%3Aweight%20)%0A)%3B%0A%0AdtNew%20%3D%20New%20Table(%20%22New%20Table%22%20)%3B%0A%20%0AFor(i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Items(dtSubsetList%20)%2C%20i%2B%2B%2C%20%0AdtNew%20%26lt%3B%26lt%3B%20Concatenate(dtSubsetList%5Bi%5D%2C%20Append%20to%20first%20table(1))%3B%20%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-780140%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3EAutomatisation%20et%20scripts%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eles%20fen%C3%AAtres%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-780152%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20non%20reconnu%20comme%20argument%20de%20table%20dans%20la%20boucle%20For%20d'acc%C3%A8s%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-780152%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EJe%20ne%20parviens%20pas%20%C3%A0%20reproduire%20le%20probl%C3%A8me.%20Votre%20script%20s'ex%C3%A9cute%20correctement%20sans%20erreur.%3C%2FP%3E%0A%3CP%3EJe%20vous%20sugg%C3%A8re%20de%20quitter%20JMP%2C%20puis%20de%20le%20rouvrir%20et%20d'ex%C3%A9cuter%20le%20script.%20Votre%20dt_Test%20n'est%20%C3%A9videmment%20pas%20dans%20le%20JSL%20que%20vous%20avez%20fourni%20et%20est%20probablement%20un%20artefact%20de%20tous%20les%20essais%20et%20erreurs%20que%20vous%20avez%20tent%C3%A9s.%3C%2FP%3E%0A%3CP%3EJe%20vais%20%C3%A9galement%20sugg%C3%A9rer%20une%20modification%20de%20votre%20code.%20La%20plateforme%20Concatenate%20a%20la%20capacit%C3%A9%20de%20concat%C3%A9ner%20plusieurs%20tables%20en%20une%20seule%20ex%C3%A9cution.%20Par%20cons%C3%A9quent%2C%20vous%20pouvez%20r%C3%A9ellement%20coller%20la%20liste%20compl%C3%A8te%20des%20tables%20de%20donn%C3%A9es%20dans%20la%20concat%C3%A9nation%20plut%C3%B4t%20que%20de%20devoir%20parcourir%20chacune%20d'elles%20s%C3%A9par%C3%A9ment.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0A%0AdtSubsetList%20%3D%20dt%20%26lt%3B%26lt%3B%20Subset(%0A%09By(%20%3Asex%20)%2C%0A%09All%20rows%2C%0A%09Selected%20columns%20only(%200%20)%2C%0A%09columns(%20%3Aname%2C%20%3Aage%2C%20%3Aheight%2C%20%3Aweight%20)%0A)%3B%0A%0AdtNew%20%3D%20New%20Table(%20%22New%20Table%22%20)%3B%0A%20%0A%2F*For(%20i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Items(%20dtSubsetList%20)%2C%20i%2B%2B%2C%0A%09dtNew%20%26lt%3B%26lt%3B%20Concatenate(%20dtSubsetList%5Bi%5D%2C%20Append%20to%20first%20table(%201%20)%20)%0A)%3B*%2F%0A%0AdtNew%20%26lt%3B%26lt%3B%20Concatenate(%20dtSubsetList%2C%20Append%20to%20first%20table(%201%20)%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
UserID16644
Level V

unrecognized as table argument in access For loop

I am trying to concatenate my subset tables, but I kept getting this error:
unrecognized as table argument in access or evaluation of 'dtSubsetList [ /*###*/i]' , dtSubsetList [/*###*/i]

Im using JMP 16

 

names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dtSubsetList = dt << Subset(
	By( :sex ),
	All rows,
	Selected columns only( 0 ),
	columns( :name, :age, :height, :weight )
);

dtNew = New Table( "New Table" );
 
For(i = 1, i <= N Items(dtSubsetList ), i++, 
dtNew << Concatenate(dtSubsetList[i], Append to first table(1)); 
);

 

 

1 REPLY 1
txnelson
Super User

Re: unrecognized as table argument in access For loop

I am unable to replicate the issue.  Your script runs properly without error.

I suggest that you exit JMP, and then reopen it and then run the script.  Your dt_Test is obviously not in the JSL you provided, and is probably an artifact of all of the trial and errors you have attempted.

I will also suggest a change to your code.  The Concatenate platform has the ability to concatenate more than one table in a single execution.  Therefore you can actually past the complete list of data table to the Concatenation rather than having to loop through each one separatly.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dtSubsetList = dt << Subset(
	By( :sex ),
	All rows,
	Selected columns only( 0 ),
	columns( :name, :age, :height, :weight )
);

dtNew = New Table( "New Table" );
 
/*For( i = 1, i <= N Items( dtSubsetList ), i++,
	dtNew << Concatenate( dtSubsetList[i], Append to first table( 1 ) )
);*/

dtNew << Concatenate( dtSubsetList, Append to first table( 1 ) );
Jim