cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
PhamBao
Level III

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

Recommended Articles