JSL:如何將公式從一個資料表複製到另一個資料表?<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />我需要將公式從一個資料表複製到另一個資料表。
我發現並設法開始工作的唯一建議是:
使用公式複製列
The easiest way is to get the script for the original data table.
data table("Original") << get script;
Now the script appears in the log. Just copy and paste into a new script, keeping only the bits related to adding the the formula columns.
然而,當我需要多次應用它時,這似乎非常複雜且耗時。
這裡建議了另一種方法:將預測公式儲存到現有列?
f = column("prednew") << Get Formula;
column("predold") << Set Formula( Name Expr( f ));
所以我嘗試了:
f = data table("table 1") << column("my formula") << Get Formula;
data table("table 2") << column("my formula") << Set Formula( Name Expr( f ));
表 2 中「我的公式」已存在,但為空
但它不起作用,並且日誌沒有給出任何錯誤。
有任何想法嗎? JMP 官方文件中是否對此進行了記錄?
回覆:JSL:如何將公式從一個資料表複製到另一個資料表?幾年後參加聚會:)
您可能還需要考慮 Formula Depot,這是 JMP Pro 13 中添加的一項功能,旨在幫助這種情況。
與其他型號、異形等等。
一探究竟:
http://www.jmp.com/support/help/13/Formula_Depot.shtml
回覆:JSL:如何將公式從一個資料表複製到另一個資料表?我無法讓您其他帖子中的方法起作用,但這非常有效 - 謝謝。
回覆:JSL:如何將公式從一個資料表複製到另一個資料表?另一個選項是使用 Get Column Properties(),然後使用 Add Column Properties() 來複製所有屬性,包括。公式。 使用此方法時不需要 Name Expr()。
舊科爾=柱子(數據表( “表格1” ) , “我的公式” ) ;
紐科爾=柱子(數據表( “表2” ) , “我的公式” ) ;
紐科爾<<新增列屬性(舊科爾<<取得列屬性() ) ;
回覆:JSL:如何將公式從一個資料表複製到另一個資料表?Get Formula() 和 Set Formula() 已記錄,而您的語法可能沒有記錄。 Column() 不能用作資料表的訊息。 請改用 Column() 的第一個參數來指定資料表。
F =柱子(數據表( “表格1” ) , “我的公式” ) <<取得公式;
柱子(數據表( “表2” ) , “我的公式” ) <<設定公式(名稱表達式( F ) ) ;