Scripting "Save where clause" in a Data filter<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Hi,
I would like to draw a histogram using a journal script with data selected previously using a Data Filter. But I need to print the 'where clause' on the output. The "Save where clause" copies this manually. Is there a way of doing this in a script?
Thank you
Re: Scripting "Save where clause" in a Data filterHi Guys
Is there a way to pass the where clause to a string variable?
Thanks
Re: Scripting "Save where clause" in a Data filterThank you MS,
That was just what I needed.
Re: Scripting "Save where clause" in a Data filterNot quite sure of your intended result, but perhaps something like this?
NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.JMP");
nw = NewWindow("Distribution with Where Clause",
dist = dt << Distribution(
Automatic Recalc( 1 ),
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) ),
Invisible
);
);
ldf = dist << Local Data Filter( Mode, Add Filter( columns( :sex ), Where( :sex == "M" ) ) );
ldf << To Journal;
nw << Journal;
nw << CloseWindow;
Close(dt, NoSave);
Re: Scripting "Save where clause" in a Data filterdf = dt << Data Filter;
// Save WHERE clause with any of the commands below
df << to Clipboard;
df << to Journal
df << to Row State Column;
df << to Data Table;
df << to Script Window;