cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
StarfruitBob
Level VI

Getting Framebox text

Hello,

 

I want to get text from a framebox, but I haven't figured out the syntax for doing this. Can someone help?

I've adapted script from this thread, but find it doesn't seem to work for what I'm looking for.
https://community.jmp.com/t5/Discussions/JSL-Retrieve-Selected-Frame-Box/m-p/14552

 

I also have another script that grabs numbers from the profiler graphing tool, and I've adapted that, but I think I haven't modified that properly either.

 

Here's an example below.

 

names default to here(1);
dt = open("$SAMPLE_DATA/Blood Pressure.jmp");

myrpt = Multivariate(
	Y( :BP 8M, :BP 12M, :BP 6M, :BP 8W, :BP 12W, :BP 6W, :BP 8F, :BP 12F, :BP 6F ),
	Estimation Method( "Row-wise" ),
	Scatterplot Matrix( 1 ),
	Jackknife Distances( 1 ),
	SendToReport(
		Dispatch( {}, "Correlations", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Scatterplot Matrix", OutlineBox, {Close( 1 )} )
	)
);

myrpt << Show tree structure;

// Try 1
mynum1 = myrpt[ Framebox(83) ] << Get text; // Send error
show( mynum1 );

// Try 2
mynum2 = Num( Report( myrpt )["Multivariate", Framebox( 83 )] << Get Text );
show( mynum2 );  // Empty

// Try 3
mynum3 = Num( Report( myrpt )["Jackknife Distances", Framebox( 83 )] << Get Text ); // Send error
show( mynum3 );

report( myrpt ) << Close report;

 

StarfruitBob_0-1674582561249.pngStarfruitBob_1-1674582590809.png

 

Is there a guide on how to get data from different parts of the tree structure?

Learning every day!
1 ACCEPTED SOLUTION

Accepted Solutions
StarfruitBob
Level VI

Re: Getting Framebox text

names default to here(1);
dt = open("$SAMPLE_DATA/Blood Pressure.jmp");

myrpt = Multivariate(
	Y( :BP 8M, :BP 12M, :BP 6M, :BP 8W, :BP 12W, :BP 6W, :BP 8F, :BP 12F, :BP 6F ),
	Estimation Method( "Row-wise" ),
	Scatterplot Matrix( 1 ),
	Jackknife Distances( 1 ),
	SendToReport(
		Dispatch( {}, "Correlations", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Scatterplot Matrix", OutlineBox, {Close( 1 )} )
	)
);

myrpt << Jackknife Distances( 1, Save Jackknife Distances );
jd1 = dt:Jackknife Distances << get property("Jackknife Value");
show(jd1);

This is an alternate way to get the value I seek.  Thank you for guiding me towards the column properties, @jthi !

Learning every day!

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Getting Framebox text

For Jackknife Distances you could first save the distances to data table and then get the "Jackknife Value" column property valueJackknife Predicted Values .

Or you can get the line seg value from the graph

names default to here(1);
dt = open("$SAMPLE_DATA/Blood Pressure.jmp");

myrpt = Multivariate(
	Y( :BP 8M, :BP 12M, :BP 6M, :BP 8W, :BP 12W, :BP 6W, :BP 8F, :BP 12F, :BP 6F ),
	Estimation Method( "Row-wise" ),
	Scatterplot Matrix( 1 ),
	Jackknife Distances( 1 ),
	SendToReport(
		Dispatch( {}, "Correlations", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Scatterplot Matrix", OutlineBox, {Close( 1 )} )
	)
);

frame = Report(myrpt)[Framebox(82)];
seg = (frame << Find Seg(Line Seg(1)));
seg << get y values;

-Jarmo
StarfruitBob
Level VI

Re: Getting Framebox text

When I show(seg), seg = DisplaySeg[]; is returned. Do you know what this is? I'm looking for the UCL value, or that entire string, because it's easy to extract what I need.

 

When I modify my Try 1, nynum1 ends up empty. Do you know why? It seems the framebox is found, but nothing is returned.

mynum1 = report(myrpt)[ Framebox(83) ] << Get text;
show( mynum1 );
Learning every day!
StarfruitBob
Level VI

Re: Getting Framebox text

names default to here(1);
dt = open("$SAMPLE_DATA/Blood Pressure.jmp");

myrpt = Multivariate(
	Y( :BP 8M, :BP 12M, :BP 6M, :BP 8W, :BP 12W, :BP 6W, :BP 8F, :BP 12F, :BP 6F ),
	Estimation Method( "Row-wise" ),
	Scatterplot Matrix( 1 ),
	Jackknife Distances( 1 ),
	SendToReport(
		Dispatch( {}, "Correlations", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Scatterplot Matrix", OutlineBox, {Close( 1 )} )
	)
);

myrpt << Jackknife Distances( 1, Save Jackknife Distances );
jd1 = dt:Jackknife Distances << get property("Jackknife Value");
show(jd1);

This is an alternate way to get the value I seek.  Thank you for guiding me towards the column properties, @jthi !

Learning every day!