cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • 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!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • 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

How to select a subset of a data table given a subset of rows

Hi this should be fairly simple to knock out.

How do I select a subset of a data table, all columns, given a subset of its rows?

I didn't see anything about this in the scripting index, neither in select where nor in subset. But apologies if it's obviously found somewhere. I just didn't find it.

 

Mike

1 ACCEPTED SOLUTION

Accepted Solutions
mostarr
Level IV

Re: How to select a subset of a data table given a subset of rows

row = dt << Get Rows (row_num); 

seems to do the trick. Thanks!

View solution in original post

3 REPLIES 3
mostarr
Level IV

Re: How to select a subset of a data table given a subset of rows

I tried 

data = dt << Subset( Rows(rows));

but it only gave me individual data tables (subsets, so, technically correct) of the first column of the row. I don't know why.

txnelson
Super User

Re: How to select a subset of a data table given a subset of rows

data = dt << Subset( Rows(rows), selected columns(0));

Try the above.  I am assuming that your variable rows contains a matrix to the row numbers you want subsetted.

Jim
mostarr
Level IV

Re: How to select a subset of a data table given a subset of rows

row = dt << Get Rows (row_num); 

seems to do the trick. Thanks!

Recommended Articles