cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-781312%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E8%85%B3%E6%9C%AC%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-781312%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%E6%88%91%E6%83%B3%E4%BF%9D%E5%AD%98%E4%BB%A5%E4%B8%8B%E8%85%B3%E6%9C%AC%EF%BC%8C%E8%A9%B2%E8%85%B3%E6%9C%AC%E9%80%8F%E9%81%8E%E5%BE%AA%E7%92%B0%E5%9C%A8%20FitGroup%20%E4%B8%AD%E7%94%A2%E7%94%9F%E5%A4%9A%E5%80%8B%E5%9F%BA%E6%BA%96%EF%BC%8C%E5%B0%B1%E5%A5%BD%E5%83%8F%E6%88%91%E6%AD%A3%E5%9C%A8%E5%9F%B7%E8%A1%8C%E3%80%8C%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%E3%80%8D%E4%B8%80%E6%A8%A3%EF%BC%8C%E4%BD%86%E5%8B%95%E6%85%8B%E5%9C%B0%EF%BC%88%E8%88%87%E5%BE%AA%E7%92%B0%E7%9B%B8%E6%AF%94%EF%BC%89%E5%A6%82%E4%BD%95%E5%81%9A%E5%88%B0%E9%80%99%E4%B8%80%E9%BB%9E%EF%BC%9F%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20Ouvrir%20la%20table%20de%20donn%C3%A9es%0Adt%20%3D%20Open(%20fichier1%20)%3B%0A%0A%2F%2F%20Initialiser%20une%20liste%20pour%20stocker%20les%20noms%20des%20colonnes%20avec%20la%20note%20%22INGOT%20CHARACTERISTICS%22%0Acols_with_note%20%3D%20%7B%7D%3B%0A%0A%2F%2F%20Parcourir%20chaque%20colonne%20de%20la%20table%20par%20index%0AFor(%20i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Cols(%20dt%20)%2C%20i%2B%2B%2C%0A%09col%20%3D%20Column(%20dt%2C%20i%20)%3B%0A%2F%2F%20V%C3%A9rifier%20si%20la%20colonne%20a%20une%20note%20%22INGOT%20CHARACTERISTICS%22%0A%09If(%20col%20%26lt%3B%26lt%3B%20Get%20Property(%20%22Notes%22%20)%20%3D%3D%20%22INGOT%20CHARACTERISTICS%22%2C%20%0A%2F%2F%20Ajouter%20le%20nom%20de%20la%20colonne%20%C3%A0%20la%20liste%0A%09%09Insert%20Into(%20cols_with_note%2C%20col%20%26lt%3B%26lt%3B%20Get%20Name%20)%0A%09)%3B%0A)%3B%0A%0APrint(%0A%09%22Colonnes%20avec%20notes%20trouv%C3%A9es%20pour%20la%20famille%20%22%20%7C%7C%20%22INGOT%20CHARACTERISTICS%22%20%7C%7C%20%22%20%3A%20%22%0A%09%20%7C%7C%20Char(%20cols_with_note%20)%20%7C%7C%20%22%5Cn%22%0A)%3B%0A%0A%2F%2F%20Cr%C3%A9er%20une%20nouvelle%20fen%C3%AAtre%20pour%20regrouper%20tous%20les%20graphiques%0Areport_window%20%3D%20New%20Window(%20%22BenchMarks_Ingot_Characteristics%22%2C%0A%09V%20List%20Box(%0A%09%09Fit%20Group(%0A%09%09%09For(%20i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Items(%20cols_with_note%20)%2C%20i%2B%2B%2C%0A%09%09%09%09col_name%20%3D%20cols_with_note%5Bi%5D%3B%0A%2F%2F%20Ajouter%20le%20graphique%20Oneway%20au%20Fit%20Group%0A%09%09%09%09Oneway(%0A%09%09%09%09%09Y(%20Column(%20dt%2C%20col_name%20)%20)%2C%0A%09%09%09%09%09X(%20Column(%20dt%2C%20selection%20)%20)%2C%0A%09%09%09%09%09Quantiles(%201%20)%2C%0A%09%09%09%09%09Means%20and%20Std%20Dev(%201%20)%2C%0A%09%09%09%09%09Box%20Plots(%201%20)%2C%0A%09%09%09%09%09Mean%20Error%20Bars(%201%20)%2C%0A%09%09%09%09%09Std%20Dev%20Lines(%201%20)%2C%0A%09%09%09%09%09X%20Axis%20Proportional(%200%20)%2C%0A%09%09%09%09%09Grand%20Mean(%200%20)%2C%0A%09%09%09%09%09SendToReport(%0A%09%09%09%09%09%09Dispatch(%20%7B%7D%2C%20%22Oneway%20Plot%22%2C%20FrameBox%2C%0A%09%09%09%09%09%09%09%7BDispatchSeg(%0A%09%09%09%09%09%09%09%09Box%20Plot%20Seg(%201%20)%2C%0A%09%09%09%09%09%09%09%09%7BConfidence%20Diamond(%200%20)%2C%20Shortest%20Half%20Bracket(%200%20)%2C%0A%09%09%09%09%09%09%09%09Line%20Color(%20%22Red%22%20)%7D%0A%09%09%09%09%09%09%09)%7D%0A%09%09%09%09%09%09)%0A%09%09%09%09%09)%0A%09%09%09%09)%3B%0A%09%09%09)%0A%09%09)%0A%09)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3E%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Efor%20info%20col_with_note%20%E5%8C%85%E5%90%AB%E4%B8%8D%E5%90%8C%E5%9F%BA%E6%BA%96%E7%9A%84%E5%BA%A7%E6%A8%99%E5%92%8C%E9%81%B8%E6%93%87%E5%9F%BA%E6%BA%96%E7%9A%84%E6%A9%AB%E5%BA%A7%E6%A8%99%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%E6%B3%B0%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-781312%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8B%95%E5%8C%96%E5%92%8C%E8%85%B3%E6%9C%AC%E7%B7%A8%E5%AF%AB%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E8%B3%87%E6%96%99%E5%AD%98%E5%8F%96%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E6%95%B8%E6%93%9A%E6%8E%A2%E7%B4%A2%E5%92%8C%E8%A6%96%E8%A6%BA%E5%8C%96%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-781322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E8%85%B3%E6%9C%AC%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-781322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20current%20data%20table()%3B%0Ajsl%3Ddt%26lt%3B%3CGET%20script%3D%22%22%3E%3C%2FGET%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%0A%3CP%3E%E5%8F%96%E5%BE%97%E8%AE%8A%E6%95%B8%E2%80%9Cjsl%E2%80%9D%E4%B8%AD%E8%B3%87%E6%96%99%E8%A1%A8%E7%9A%84%E8%85%B3%E6%9C%AC%3C%2FP%3E%3C%2FCODE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-781326%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E8%85%B3%E6%9C%AC%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-781326%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%AE%83%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%E6%88%91%E6%83%B3%E5%B0%87%E5%85%B6%E4%BF%9D%E5%AD%98%E5%88%B0%20dt%20(%3Dopen(fichier1))%E3%80%82%E5%A6%82%E6%9E%9C%E6%9C%89%E5%B9%AB%E5%8A%A9%E7%9A%84%E8%A9%B1%E6%88%91%E6%9C%89%20JMP%2016%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-781340%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E8%85%B3%E6%9C%AC%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-781340%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-to-save-the-benchmarks-window-to-the-data-table%2Fm-p%2F780989%23U780989%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-forum-thread%20lia-fa-icon%20lia-fa-forum%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3E%E5%A6%82%E4%BD%95%E5%B0%87%E5%9F%BA%E6%BA%96%E6%B8%AC%E8%A9%A6%E8%A6%96%E7%AA%97%E5%84%B2%E5%AD%98%E5%88%B0%E8%B3%87%E6%96%99%E8%A1%A8%E4%B8%AD%EF%BC%9F%3C%2FA%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E
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