我想用脚本从所有列中删除所有公式。 我写了一个forloop,但是需要确定一列是否有公式。 如何用脚本做到这一点?
一种选择是使用 <
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
col1 = dt << New Column("Ratio", Numeric, Continuous);
col1 << Formula(:height / :weight);
wait(1);
For Each({col_name}, dt << Get Column Names("String"),
col = Column(dt, col_name);
If(!Is Empty(col << get formula),
Column(dt, col_name) << Delete Formula
);
);
Scripting Index 有很多资料,你可以直接从 JMP 的菜单 Help / Scripting Index 中找到

如果您自己添加这些公式并且并不真正需要它们用于公式使用,则可以通过使用 << Set Each Value() 避免将它们全部添加在一起