我想用腳本從所有列中刪除所有公式。 我寫了一個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() 避免將它們全部添加在一起