So I think I've over scripted this, and now stuck a bit where I can't figure out how to make this generic.
So I've got 3 sequential Query scripts that are getting longer and longer to ultimately subset the original dataset by chartID's with pVal <0.05.
is there a better way? by the time I get to Query#3 (joining), I have to save the Query#2 dt locally rather than run from memory and the script includes the specific list of ChartID's rather than a generic variable.
ow = Oneway(
Y( :MEAN ),
X( :CHAMBER ),
By(:ChartID),
All Pairs( 1 )
//and then all the normal chart formatting and stuff
)
//create the pVal dt
dt1 = Report( ow[1] )["Means Comparisons", "Comparisons for all pairs using Tukey-Kramer HSD","Ordered Differences Report"][Table Box( 1 )] << Make Combined Data Table;
dt1 << set name( "pValue PairWise by Channel Tukey")
query#1 --> dt1 where pVal <=0.05
Query#2 --> count distinct ChartID of query#1
Query#3 --> join dataset w/ Query#2 by ChartID
close all
replot the charts with the smaller subset of data.