脚本自动运行所有选定的子集你好,
是否有可能同时自动运行由超过 50 个名称组成的所有子集列?
当我按名称进行子集处理时,我得到了我想要的所有详细数据,但我需要逐个单击才能运行拟合 y x 分析。有没有办法让我选择全部并自动运行拟合 y x 分析?所有这些子集名称每次都可能发生变化。

数据混合和清理数据探索与可视化回复:脚本自动运行所有选定的子集这是一个小脚本,显示了做您想要的一种方法的示例
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
// Get the current number of data tables
numDT = N Table();
// Perform the subsets
dt << Subset(
By( :age ),
All rows,
Selected columns only( 0 ),
columns( :name, :sex, :height, :weight )
);
// Loop across all new data tables and run Fit Y by X
For( i = 1, i <= N Table() - numDT, i++,
Data Table( i ) << Bivariate( Y( :height ), X( :weight ) )
);
回复:脚本自动运行所有选定的子集问题是For()循环的停止值。 您正在指定
For( i = 1, i <= N Table() - numDT, i++,
然后在您的代码中创建一个新的数据表,因此下次循环发生时,
N Table()
已经增加了一个额外的计数,因此变量'i'永远无法达到N Table()的当前值
回复:脚本自动运行所有选定的子集仅供参考,当您进行子集设置时,可以将子集表分配为列表,而不是使用N Table(),如果您打开了一堆其他表(通常包括原始表子集),则可能会出现问题。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
// Perform the subsets
listDT = dt << Subset(
By( :age ),
All rows,
Selected columns only( 0 ),
columns( :name, :sex, :height, :weight )
);
// Loop across all new data tables and run Fit Y by X
For( i = 1, i <= N Items( listDT ), i++,
listDT[i] << Bivariate( Y( :height ), X( :weight ) )
);
回复:脚本自动运行所有选定的子集@tikhahabusamah
删除我的解决方案(@txnelson)并选择 @ ts2 作为解决方案。 这是一个更好的解决方案!
回复:脚本自动运行所有选定的子集我尝试在子集之后按名称进行拆分,这是在运行表将Y乘以X之前,但是每次尝试运行JMP时,都不再响应。为什么?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
// Get the current number of data tables
numDT = N Table();
// Perform the subsets
dt << Subset( By( :age ), All rows, Selected columns only( 0 ), columns( :name, :sex, :height, :weight ) );
// Loop across all new data tables and run Fit Y by X
For( i = 1, i <= N Table() - numDT, i++,
Data Table( i ) << Split( Split By( :name ), Split( :sex, :height, :weight ) )
);