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
mostarr
Level IV

Get Rows() not working

I have

row_nums = data << Get Rows Where( num(data:"Donor") == i & data:"A or B" == "A");
d_A_rows = data << Get Rows(row_nums);
Write(d_A_rows);

but it writes the row numbers still instead of the actual row content. Am I missing something?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Get Rows() not working

Hi,

 

You can do this:

 

row_nums = data << Get Rows Where( Num( data:"Donor" ) == i & data:"A or B" == "A" );

Write( data[row_nums, 0] );

Once you have the row numbers you need in row_nums, you can index the table (which I presumed is named data) directly using the syntax table[row,col]. In your case, row_nums are the rows you want, and 0 means to get all columns.

 

Cheers,

Brady

View solution in original post

2 REPLIES 2

Re: Get Rows() not working

Hi,

 

You can do this:

 

row_nums = data << Get Rows Where( Num( data:"Donor" ) == i & data:"A or B" == "A" );

Write( data[row_nums, 0] );

Once you have the row numbers you need in row_nums, you can index the table (which I presumed is named data) directly using the syntax table[row,col]. In your case, row_nums are the rows you want, and 0 means to get all columns.

 

Cheers,

Brady

mostarr
Level IV

Re: Get Rows() not working

Thank you. That works perfectly, and is very incisive in educating me about coordinate-indexing tables as well.

Recommended Articles