无法使用数组重命名标签页大家好 ,
我试图使用数组重命名标签页,但它没有这样做,有人可以告诉我是什么问题?
step [i]似乎无法重命名标签页。
step = {};
step = {1,2,3,4};
New Window( "Example", nwbb = Tab Box() );
For( i = 1, i <= n Items(step), i++,
nwbb <<ADD></ADD>Re:无法使用数组重命名标签页JMP没有将选项卡名称作为可以在解释它之前进行评估的项目来处理,因此,我倾向于使用的方法是使用Substitution()函数生成所需的语句,该函数提供给JMP解释器,完全填写的代码流。 下面的示例处理您想要的内容:
step = {};
step = {1, 2, 3, 4};
New Window( "Example", nwbb = Tab Box() );
For( i = 1, i <= N Items( step ), i++,
Eval(
Substitute(
Expr(
nwbb << Add(
Tab Page Box(
__step__,
TB = Tab Box(
Tab Page Box(
"Summary",
Data Table To Table Box(dt)
),
Tab Page Box(
"Pareto Chart",
ob1 = Outline Box( "Pareto Chart",
dt << Distribution( Column( :Height, :Weight ), By( :sex ) )
)
)
)
)
)
),
Expr( __step__ ), Char( step[i] )
)
)
);Re:无法使用数组重命名标签页 @kuannygoh ,
我尝试运行代码时注意到的一些事情是:
1。你的parantheses是不平衡的。
2。数据表到表格框 - 我不知道JMP中的这个功能
感谢Discovery Summit(我相信这是 @pmroz 的工作) - 有一个例子,我可以从帽子拉出标签框。除非您看到其他内容,否则您的问题可能与命名无关。如果您是 - 请分享您的日志和您关注的快照
dt = open("$sample_data\Candy Bars.jmp", invisible);
xcol = "Calories";
ycols = {"Total fat g", "Saturated fat g", "Cholesterol g"};
gw = new window("Graphical Output",
outlinebox(xcol || " vs:",
tb = tab box()
)
);
for(i = 1, i <= nitems(ycols), i++,
ycol = ycols[i];
tb << add(ycol, vlistbox(
dt << Graph Builder(
Size( 530, 450 ),
Show Control Panel( 0 ),
Variables( X( as column( xcol ) ), Y( as column( ycol ) ) ),
Elements( Points( X, Y, Legend( 5 ) ), Smoother( X, Y, Legend( 6 ) ) )
),
));
);