jsl:如何使用组列表进行绘图?这篇文章的后续内容: https://community.jmp.com/t5/Discussions/Script-to-loop-thru-and-group-columns-by-name-dynamically/mp/470274#M71439
我按 StepID 将 10k 多列分组,但现在尝试将它们全部绘制出来。
我不太清楚如何告诉它根据所有组的列表进行绘图。有什么建议吗?

/*plotting a basic Fit YbyX just to get pValues. Formatting and style done on final plot*/
ow1 = Oneway(
Y( dtAggWide<<GET column="" group=""></GET>
数据混合和清理回复:jsl:如何使用组列表进行绘图?非常感谢解决了这个问题。我的读后感并没有发现 get 函数可以提取出我需要的信息。
回复:jsl:如何使用组列表进行绘图?非常感谢,我的帖子阅读都没有发现 get 函数有助于提取该信息。
回复:jsl:如何使用组列表进行绘图?这是代码的重写,消除了表达式构建的需要
Names Default To Here( 1 );
dt = Current Data Table();
dt<< set name( "AggWide" );
//get the column groups and put them into one long list
colgroupNames = dt << get column groups names;
colsList = {};
For( i = 1, i <= N Items( colgroupNames ), i++,
Insert Into( colsList, dt << get column group( colgroupNames[i] ) )
);
//temporary string for testing
RecipeStepIndex = {"10.0.0.0.0.0", "11.0.0.0.0.0", "12.0.0.0.0.0"};
// Build a character string that represents the commands that need to be run
ow1 = Oneway(
Y( Eval( colsList ) )
,
X( :ChamberID ),
//By(:),
//All pairs Tukey HSD test
All Pairs(
1,
Confidence Quantile( 0 ),
Difference Matrix( 0 ),
LSD Threshold Matrix( 0 ),
Connecting Letters Report( 0 ),
Ordered Differences Report( 1 )
),
//invisible, //use this to speed up.
);
回复:jsl:如何使用组列表进行绘图?所以我从@tx尼尔森: https://community.jmp.com/t5/Discussions/Script-multiple-columns-grouped-in-distribution-plot/td-p/162557
但想知道是否有一种方法可以循环遍历组名称而不是执行此表达式构建操作。
Names Default To Here( 1 );
dtAggWide = current data table();
dtAggWide << set name( "AggWide");
//get the column groups
colgroupNames = dt << get column groups names;
//temporary string for testing
RecipeStepIndex ={"10.0.0.0.0.0", "11.0.0.0.0.0", "12.0.0.0.0.0"}
// Build a character string that represents the commands that need to be run
theExpr_start = "ow1 = Oneway(
Y( dtAggWide<<GET column="" group=""></GET>回复:jsl:如何使用组列表进行绘图?
好的,我已经明白了,但我不确定如何在 Y( 部分中继续循环并创建新术语。
有什么建议吗?
colgroupNames = dt << get column groups names;<BR /><BR />/*plotting a basic Fit YbyX just to get pValues. Formatting and style done on final plot*/<BR />ow1 = Oneway(<BR />Y( dtAggWide<<GET column="" group=""></GET>, dtAggWide<<GET column="" group=""></GET>, dtAggWide<<GET column="" group=""></GET>),<BR />X( :ChamberId ),<BR />//By(:),<BR /><BR />//All pairs Tukey HSD test<BR />All Pairs(<BR />1,<BR />Confidence Quantile( 0 ),<BR />Difference Matrix( 0 ),<BR />LSD Threshold Matrix( 0 ),<BR />Connecting Letters Report( 0 ),<BR />Ordered Differences Report( 1 )<BR />),<BR />//invisible, //use this to speed up.<BR />);dtAggWide = current data table();
dtAggWide << set name( "AggWide");
RecipeStepIndex ={"10.0.0.0.0.0", "11.0.0.0.0.0", "12.0.0.0.0.0"} // column groups names. Each group has 100+ columns.
//trying to create a series of charts using the groups, looping through the groups
ow1 = Oneway(
Y( for( i = 1, i<=Nitems( RecipeStepIndex), i++,
dtAggWide<<GET column="" group=""></GET>回复:jsl:如何使用组列表进行绘图?对不起,我在这里挣扎。
我不知道为什么要嵌套 evaexpr?
有没有办法替代
Y( dtAggWide<<GET column="" group=""></GET>
带有列组列表?
我之前创建了这个列表,如何将此 RecipeStepIndex 交换到 Y 组中
//Build and prefill an Array of names of the RecipeStepId
Summarize( dt, RecipeStepIndex = by( :RecipeStepId) );//get list of unique RecipeStepID's

回复:jsl:如何使用组列表进行绘图?你很可能可以用这样的东西来做到这一点(你需要 EvalEvalExpr):
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Group Columns("group1", {"height", "weight"});
Eval(
EvalExpr(
dt << Oneway(
Y(Expr(dt << Get Column Group("group1"))),
X(:age)
)
)
);
看使用 Eval Insert、Eval Expr、Parse 和 Substitute 将一个表达式插入另一个表达式有关 Eval(EvalExpr()) 的更多信息和示例