cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar

How to save to data Table but with script

Hello, I would like to save the following script which generates several BenchMarks in a FitGroup via a loop as if I were doing a "save to data table" but dynamically (compared to the loop) how to do it?

 

// Ouvrir la table de données
dt = Open( fichier1 );

// Initialiser une liste pour stocker les noms des colonnes avec la note "INGOT CHARACTERISTICS"
cols_with_note = {};

// Parcourir chaque colonne de la table par index
For( i = 1, i <= N Cols( dt ), i++,
	col = Column( dt, i );
// Vérifier si la colonne a une note "INGOT CHARACTERISTICS"
	If( col << Get Property( "Notes" ) == "INGOT CHARACTERISTICS", 
// Ajouter le nom de la colonne à la liste
		Insert Into( cols_with_note, col << Get Name )
	);
);

Print(
	"Colonnes avec notes trouvées pour la famille " || "INGOT CHARACTERISTICS" || " : "
	 || Char( cols_with_note ) || "\n"
);

// Créer une nouvelle fenêtre pour regrouper tous les graphiques
report_window = New Window( "BenchMarks_Ingot_Characteristics",
	V List Box(
		Fit Group(
			For( i = 1, i <= N Items( cols_with_note ), i++,
				col_name = cols_with_note[i];
// Ajouter le graphique Oneway au Fit Group
				Oneway(
					Y( Column( dt, col_name ) ),
					X( Column( dt, selection ) ),
					Quantiles( 1 ),
					Means and Std Dev( 1 ),
					Box Plots( 1 ),
					Mean Error Bars( 1 ),
					Std Dev Lines( 1 ),
					X Axis Proportional( 0 ),
					Grand Mean( 0 ),
					SendToReport(
						Dispatch( {}, "Oneway Plot", FrameBox,
							{DispatchSeg(
								Box Plot Seg( 1 ),
								{Confidence Diamond( 0 ), Shortest Half Bracket( 0 ),
								Line Color( "Red" )}
							)}
						)
					)
				);
			)
		)
	)
);

 

for info col_with_note contains the coordinates of the different benchmarks and selection the abscissa of the benchmarks

 

Ty

3 REPLIES 3
Byron_JMP
Staff

Re: How to save to data Table but with script

Names Default To Here( 1 );
dt = current data table();
jsl=dt<<get script();

gets the script for the data table in variable "jsl"

JMP Systems Engineer, Health and Life Sciences (Pharma)

Re: How to save to data Table but with script

It didn't work I want to save it to dt (=open(fichier1)). If it could help I have JMP 16

jthi
Super User

Re: How to save to data Table but with script