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
Choose Language Hide Translation Bar
PhamBao
Level II

Cannot set value from list a variable

Dear all,

I try to do scripting, but find difficulty and need your help

para ={"align_ratio_2","align_ratio_1","minchaseforcef_3","maxchaseholdforce_4"};

 

1) U1L1_MEAN[1] = Col MEAN(TCB1L_U1:para[1]);

2) U1L1_MEAN[1] = Col MEAN(TCB1L_U1:align_ratio_2);
There are different outputs between 1 and 2. For further checking, the output from 2 is correct. 
Can anyone help me how to correct statement 1

Sincerely,

1 REPLY 1
txnelson
Super User

Re: Cannot set value from list a variable

Here is the way I would handle your issue.  I am using the Big Class data table for my example.

Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

dt << New Column( "U1L1_MEAN" );

para = {"height", "weight"};

:U1L1_Mean[1] = Col Mean( As Column( dt, para[1] ) );
Jim