cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
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!