How to use data table scoping?Hi,
I have multiple data tables in my application. One is the main table opened in the beginning, others have been created
using subset. I have the things working but I would like some clarification.
I am having trouble using the scoping. I would like to know if I absolutely have to use Current Data Table(dt) before plotting something
or I can just use dt:ColumnName and so on inside my plots.
For example:
Distribution(
Continuous Distribution(
Column(dt:ColumnName)
)
); Is the use of dt okay in this case? Can I use dt in the "By" group as well? Or do I always need to make dt my current table and then use column
names without table reference.
Thank you.
Re: How to use data table scoping?The proper way to scope what data to use for a platform is to pass to the data table a platform message. This insures that the platform is using the correct data table
names default to here(1);
dt = Open("$SAMPLE_DATA/big class.jmp");
dt << select where(:Sex == "F");
dt2 = dt << subset( selected rows(1), selected columns(0));
// run a Bivariate against the original data table
dt << Bivariate(x(;weight), y(:height));
// run a Bivariate against the subsetted data table
dt2 << Bivariate(x(;weight), y(:height));