Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
SciOfMfg
Level I

Using a subset to select a larger dataset

I've got a large data-set of simulation data that needs to be reduced.  Table 1: Description, ID, Data1,Data2,...DataN

I double subset on Description, then on Data1.  I now know all the ID numbers I need (there are 35 unique ID's)

 

How can would one take the 35 unique ID's and subset Table 1 on all the rows that match the 35 unique ID's.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Using a subset to select a larger dataset

You can use a Contains() function to do what you want.  Below is a very simple example.  The key will how to create a list with your 35 IDs.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

idList = {"KATIE", "LILLIE", "DAVID"};

dt << select where( Contains( idList, :Name ) );
Jim

View solution in original post

3 REPLIES 3
Highlighted
txnelson
Super User

Re: Using a subset to select a larger dataset

You can use a Contains() function to do what you want.  Below is a very simple example.  The key will how to create a list with your 35 IDs.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

idList = {"KATIE", "LILLIE", "DAVID"};

dt << select where( Contains( idList, :Name ) );
Jim

View solution in original post

Highlighted
SciOfMfg
Level I

Re: Using a subset to select a larger dataset

The list of ID's would come from a column in the Subset of the Subset

Highlighted
txnelson
Super User

Re: Using a subset to select a larger dataset

That makes it easy:

dtsub=data table("subsetofsubset");
idList = dtsub:ID << get values;
Jim
Article Labels

    There are no labels assigned to this post.