- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Put in table
Hello everyone,
I've had a problem for a while on JMP, I use the table option to calculate averages (around 900 columns)
All columns start with the same expression “time #number”
I'm looking for a script that could execute this table option with a variable in which all these "tps..." columns would be stored.
An example of the database and code I use:
dt = Current Data Table();abc_cols = Filter Each( {col_name}, dt << Get Column Names( "String", Continuous ),
Starts With( col_name, "tps" )
);
Local( {obj},
obj = Data Table( "B" ) << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table(
Analysis Columns(
Column(abc_cols)
),
Statistics( Mean )
),
Row Table ( Grouping Columns ( :Article))
)
);
obj << Make Into Data Table;
obj << Close Window;
);
This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Mettre en tableau
I would suggest using Summary instead of Tabulate. In this case you can use Eval() around your column listing
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
col_list = {"height", "weight"};
// using summary
dt_summary = dt << Summary(
Mean(Eval(col_list)),
Freq("None"),
Weight("None"),
link to original datatable(0)
);
// using tabulate
tab = dt << Tabulate(
Show Control Panel(0),
Add Table(Column Table(Analysis Columns(Eval(col_list)), Statistics(Mean)))
);
dt_tab = tab << Make Into Data Table;
tab << close Window;
-Jarmo
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Mettre en tableau
I would suggest using Summary instead of Tabulate. In this case you can use Eval() around your column listing
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
col_list = {"height", "weight"};
// using summary
dt_summary = dt << Summary(
Mean(Eval(col_list)),
Freq("None"),
Weight("None"),
link to original datatable(0)
);
// using tabulate
tab = dt << Tabulate(
Show Control Panel(0),
Add Table(Column Table(Analysis Columns(Eval(col_list)), Statistics(Mean)))
);
dt_tab = tab << Make Into Data Table;
tab << close Window;
-Jarmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Table
Thanks for your answer, it works fine!
This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .