當您執行諸如雙變量之類的操作並使用Where()命令時,JMP輸出通常會有一些文本“ where(:column 1 =='F')或類似的內容
我正在做一些腳本編寫,但我不想顯示該文本。 有沒有一種方法可以防止這種情況的發生或在事實發生後將其刪除。 通常,我只使用BY()命令,但是在這種情況下,我基本上希望遍歷BY()級別,以便可以控制實時報告最終進入哪個窗口。 我的腳本工作正常,但是那討厭的文本確實使它看起來很美。
謝謝!
這是一個包含where子句和將其刪除的代碼的報告示例。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Gender_List = {"M", "F"};
age_list = {12, 13, 14, 15};
Property_List = {"Age", "Height", "Weight"};
w = New Window( "test", VLB = V List Box( Text Box( "A" ), dt << Distribution( Nominal Distribution( Column( :age ) ) ) ) );
For( j = 1, j <= N Items( Gender_List ), j++,
VLB << Append( Text Box( Gender_List[j] ) );
VLB << Append(
LB = LB = Lineup Box( N Col( 2 ), spacing( 10 ),
For( i = 1, i <= N Items( Property_List ), i++,
gb = dt << Distribution( Continuous Distribution( Column( Property_List[i] ) ), where( :Sex == Gender_List[j] ) )
)
)
);
);
whereTb = w << XPath("//TextBox[contains(text(), 'Where(:sex == Gender_List[j])')]");
whereTb << Delete;
請參閱先前的社區討論這裡
謝謝! 我實際上想知道是否可以使用XPath來修復它,但是我根本沒有使用XPath,所以這實際上有兩種幫助!
並且感謝您提供了其他討論的鏈接,我發現但完全沒有解決我的問題。
是的,XPath可以用於此目的。
Names Default To Here( 1 );
// open example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// open platform with By role
biv = dt << Bivariate(
Y( :weight ),
X( :height ),
Where( :age == 14 | :age == 16 ),
Fit Line
);
Wait( 2 );
// hide text box
biv rep = biv << Report;
((biv rep << Top Parent) << XPath( "//TextBox" ) ) << Delete;