How to add analysis columns based on the column's data type?<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi,guys,
When we are using Tabulate function,is there any way for us to add analysis columns based on the data type?
I mean,for example,now I have a raw table with 1 column who's data type is character,all others are Numeric.But the number of Numeric columns would change because another script.I want to add all the Numeric columns as analysis columns when using Tabulate no matter what are the column names and how many Numeric columns there are.
,Is there any way to realise this by writing JSL script?
Thanks for help.
Re: How to add analysis columns based on the column's data type?This script can work,Thank you
Re: How to add analysis columns based on the column's data type?hi there,
try this.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// make a list of the continuous columns in the data table
CNames = dt << Get Column Names( Continuous );
Tabulate(
Add Table(
Column Table( Grouping Columns( :age ) ),
Row Table( Analysis Columns( Eval( CNames ) ), // plant the list of columns in the formula
Statistics( N, Mean, Std Dev ) )
)
);