blue
blue

Reputation: 1

How to make the subset data table with different names

I can generate all subset data tables from my big dataset. But I face one problem in JMP — it can't have two data tables with same name. The name can be changed for second, third, and etc.

Does anyone know how to make different data tables have different names? When I want to generate the chart, it only comes out with the last data table information.

Here is my code:

S = {"S25", "T33","Z40","F40","A10"};

//Subset the data table
For( i = 1, i <= N Items( S ), i++,
dt:Family Device << set name( "family device" );

dt << Select Where(Starts With( dt:family device, S[i] ) ) ;

tmpDT = dt << Subset( output table name( "Subset" ), selected rows( 1 ), selected columns( 0 ), "invisible");

);

The tmpDT can only generate the last data table. I have five subset data tables, all named as tmpDT. How can I point the variable to the data table with a different name?

Upvotes: 0

Views: 2323

Answers (1)

Syamanthaka
Syamanthaka

Reputation: 1337

You could give a different name to the table created like so:

tmpDT = dt << Subset( output table name( "Subset"||i), selected rows( 1 ), selected columns( 0 ), "invisible");

Then when you want to work on the new tables, refer to them by their names, which would now be unique.

Upvotes: 0

Related Questions