我正在嘗試從圖中提取腳本並將其保存到資料表以供將來使用。
下面是我針對「範例資料庫」中的「鎮痛藥」表編寫的腳本,但它並沒有像我希望的那樣運作。
“print(dtp_script)”行顯示正確的腳本。
但是,在資料表中儲存的實際「plot_dt1」腳本僅包含「dtp_script」變數名,而不是實際腳本。如何將實際腳本儲存到資料表中?謝謝!
dt = current data table ();
dtplot = dt << Fit Group( Oneway( Y( :pain ), X( :gender ) ),
Oneway( Y( :pain ), X( :drug ) ),
<<{Arrange in Rows( 2 )} );
dtp_script = dtplot << get script;
print (dtp_script);
dt << new script("plot_dt1", dtp_script );