- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Remove "where(...)" text in report
When you do something like a bivariate, and you use the Where() command, the JMP output usually has a bit of text "where(:column 1 == 'F') or something
I am doing some scripting and I don't want that text showing up. Is there a way to keep that from happening or to remove it after the fact. Typically i just use the BY() command, but in this instance I want to basically iterate through the BY() levels so I can control which windows the live reports end up in. My script works fine, but that pesky text really makes it look meh.
Thanks!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Remove "where(...)" text in report
Here is an example of a report that has a where clause and the code that deletes it.
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;
See the previous Community Discussion here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Remove "where(...)" text in report
Here is an example of a report that has a where clause and the code that deletes it.
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;
See the previous Community Discussion here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Remove "where(...)" text in report
Thanks! I actually was wondering if XPath could be used to fix it, but I have not used XPath much at all, so this actually helped in a couple ways!
And thanks for the link to the other discussion, I found that but totally missed the fix for my problem in it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Remove "where(...)" text in report
Yes, XPath can be used for this purpose.
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;