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
viskovicz00012
Level II

help with tables

 

dt = current data table();
dt << subset(by(:p20000), All Rows, All Columns);

//When I subset dt by :p20000, it outputs atmost 3 data tables ‘p20000=1000’, ‘p20000=1001’, ‘p20000=1002’.
//What I do next is to check if such dt exists 

exist= Try(Data Table("P20000=1002");tableExist = 1,tableExist = 0);

);

//if tab_1002,
tab_1002=expr(insery my long script here);
//if tab_1001,
tab_1001=expr(insert script here);

So if p20000=1002 exists, I will use the expression tab_1002,
and if p2000=1001 exists, I will use the expression tab_1001.

 

However there are some cases where when subsetting, only data table p20000=1000 exists.

Im confused how to do these with conditions.

 

1 REPLY 1
ian_jmp
Level X

Re: help with tables

You may be able to use this kind of approach:

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dtList = dt << subset(by(:sex), All Rows, All Columns);
for(t=1, t<=NItems(dtList), t++, Print(dtList[t] << getName));

Recommended Articles