简体   繁体   English

如何使子集数据表具有不同的名称

[英]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. 但是我在JMP中面临一个问题-它不能有两个同名的数据表。 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. tmpDT只能生成最后一个数据表。 I have five subset data tables, all named as tmpDT. 我有五个子集数据表,都命名为tmpDT。 How can I point the variable to the data table with a different name? 如何将变量指向具有不同名称的数据表?

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. 然后,当您要使用新表时,请使用它们的名称来引用它们,这些名称现在将是唯一的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM