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()) 的詳細資訊和範例