cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hcarr01
Level VI

Mettre en tableau

Bonjour à tous,
 
J’ai un problème depuis un petit moment sur JMP, j’utilise l’option mettre en tableau pour calculer des moyennes (environ sur 900 colonnes)
Toutes les colonnes commencent par la même expression « tps #numéro »
Je cherche un script qui pourrait exécuter cette option mettre en tableau avec une variable dans laquelle serait stockée toutes ces colonnes « tps... »
 
Un exemple de la base de donnée et du code que j’utilise :
 

 

hcarr01_0-1685358633644.png

 

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; );

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

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

View solution in original post

2 REPLIES 2
jthi
Super User

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
hcarr01
Level VI

Re: Mettre en tableau

Merci pour votre réponse, cela fonctionne correctement !

Recommended Articles