各位,
我有一个 jmp 数据表,如下面的输入数据表格式所示,其中包含多列 ~50
行数也很灵活,可以从 1 级到 100 级不等
我打算生成一个统计摘要 jmp 表,如输出表格式所示。
现在我这样做的方式非常麻烦,因为我对每个列名称进行硬编码,并且占用了大量代码。
有没有更快的方法得到最终的统计表。
//---Input data table
A B C ..............about 50 columns
class1 21.5 54.9
class2 22.3 65.9
class3 29.2 58.5
class4 32.1 76.1
class5 54.7 87.1
class6 23.9 89.2
//---Output desired
Mean(of class1 to 6) Median(of class1 to 6) Interquartile range(of class1 to 6) standard deviation(of class1 to 6) range(of class1 to 6)
A
B
C
.
.
.
//--Present approach----bad way: group, stack and then split----->>
Grouped_Sum = dt <<
Summary(
Median(
:Name("A"),:Name("B"),.......
),
Std Dev(
:Name("A"),:Name("B"),.......
),
Mean(
:Name("A"),:Name("B"),.......
),
Interquartile Range(
:Name("A"),:Name("B"),.......
),
Range(
:Name("A"),:Name("B"),.......
),
Freq( "None" ),
Weight( "None" )
);
Stack_me = Grouped_Sum <<
Stack(
columns(
:Name("Median(A)"),:Name("Median(B)"),....,
:Name("Std Dev(A)"),:Name("Std Dev(B)"),
:Name("Interquartile Range(A)",),:Name("Interquartile Range(B)"),
.......
),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Drop All Other Columns( 1 ),
Output Table( "stacked_data" )
);
Final = Stack_NMT << Split(
Split By( :handle ),
Split( :Data ),
Group( :something ),
Remaining Columns( Drop All )
);提前致谢。
是的,在红色三角形下方,有一个选项“制作成数据表”。 你需要养成探索所有红色三角形等的习惯。
谢谢吉姆。 制表非常适合我。
有没有办法可以将 tabulate 的输出表发送到 jmp 数据表?
2 条回复
1. 如果您使用的话,您应该能够直接进入您想要的输出显示
分析==>制表
2. 您不需要为您所采用的方法进行任何输入。 如果您只是以交互方式运行摘要并创建摘要数据表,如果您转到输出数据表左上角的表格面板,它将有一个名为“源”的选择,如果您对其进行编辑,它会显示已生成的用于创建摘要输出的所有代码。 您可以对“堆栈”步骤和“拆分”步骤执行相同的操作。 您所需要做的就是复制并粘贴 JSL