除非事後運行,否則腳本部分不會執行我有一部分腳本用於重新編碼表中的列以將值從“X”更改為 0。 當與我的主腳本分開運行時,這部分代碼可以工作(感謝 JMP 論壇!!)。 但是,當我將其插入到更大的腳本中時(即使在最後),JMP 也不會執行我的命令。 當代碼被放置在我的腳本中間時,它沒有運行後的所有內容......所以我將它移到了我的主腳本的底部,但它仍然沒有執行。 每次我突出顯示這部分並在之後運行它時,它完全符合我的要求。
我嘗試實現 wait(0);,從 i 更改為 k,並在 For Each Row 周圍使用 Try 語句,但沒有運氣。 我真的很困惑為什麼它只能在事後起作用。 建議?
//Recode columns in Yield Table to give "0" instead of X's
wait(0);
yieldcols = Yields << get column names;
For Each Row( For( k = 1, k <= N Items( yieldcols ), k++,
If( Is Missing( As Column( yieldcols[k] )[] ),
As Column( yieldcols[k] )[] = 0 ) ) );
腳本編寫回复:除非事後運行,否則腳本部分不會執行//Recode columns in Yield Table to give "0" instead of X's
yieldcols = Yields << get column names;
For( col = 1, col <= N Items( yieldcols ), col++,
For Each Row( If( Is Missing( As Column( yieldcols[k] )[] ), As Column( yieldcols[k] )[] = 0 ) )
);
回复:除非事後運行,否則腳本部分不會執行剛試了一下。 即使單獨運行,這也不起作用。 我的原始腳本有效,但僅當單獨運行時(事實上,在整個腳本運行後,我 Ctrl+R 那個部分)。回复:除非事後運行,否則腳本部分不會執行//Recode columns in Yield Table to give "0" instead of X's
yieldcols = Yields << get column names;
For( col = 1, col <= N Items( yieldcols ), col++,
For Each Row( If( Is Missing( As Column( yieldcols[col] )[] ), As Column( yieldcols[col] )[] = 0 ) )
);