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%3Enicht%20als%20Tabellenargument%20in%20Access%20For-Schleife%20erkannt%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-780140%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3EIch%20versuche%2C%20meine%20Teilmengentabellen%20zu%20verketten%2C%20erhalte%20jedoch%20st%C3%A4ndig%20diese%20Fehlermeldung%3A%3CBR%20%2F%3E%20nicht%20als%20Tabellenargument%20beim%20Zugriff%20oder%20bei%20der%20Auswertung%20von%20'dtSubsetList%20%5B%20%2F*%23%23%23*%2Fi%5D'%20%2C%20dtSubsetList%20%5B%2F*%23%23%23*%2Fi%5D%20erkannt%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%3EAutomatisierung%20und%20Skripting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%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%3EBetreff%3A%20Wird%20in%20der%20Access-For-Schleife%20nicht%20als%20Tabellenargument%20erkannt%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-780152%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIch%20kann%20das%20Problem%20nicht%20reproduzieren.%20Ihr%20Skript%20wird%20ordnungsgem%C3%A4%C3%9F%20und%20ohne%20Fehler%20ausgef%C3%BChrt.%3C%2FP%3E%0A%3CP%3EIch%20schlage%20vor%2C%20dass%20Sie%20JMP%20beenden%2C%20es%20erneut%20%C3%B6ffnen%20und%20dann%20das%20Skript%20ausf%C3%BChren.%20Ihr%20dt_Test%20befindet%20sich%20offensichtlich%20nicht%20in%20der%20von%20Ihnen%20bereitgestellten%20JSL%20und%20ist%20wahrscheinlich%20ein%20Artefakt%20all%20Ihrer%20Versuche%20und%20Fehler.%3C%2FP%3E%0A%3CP%3EIch%20werde%20auch%20eine%20%C3%84nderung%20Ihres%20Codes%20vorschlagen.%20Die%20Concatenate-Plattform%20kann%20mehrere%20Tabellen%20in%20einer%20einzigen%20Ausf%C3%BChrung%20verketten.%20Daher%20k%C3%B6nnen%20Sie%20tats%C3%A4chlich%20die%20vollst%C3%A4ndige%20Liste%20der%20Datentabellen%20an%20die%20Verkettung%20%C3%BCbergeben%2C%20anstatt%20jede%20Tabelle%20einzeln%20durchlaufen%20zu%20m%C3%BCssen.%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