cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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