BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
abdulj
Community Trekker

Trouble addressing display boxes in distribution platform

As part of a larger program, i'm launching the distribution platform and am extracting certain data from the different display boxes.

 

Up till now i've been doing this using "Where" and looping through different variables from a column. I now want to do the same thing using "By" so that i only launch the platform once and grab all the data.

 

When i modify my code and go from "Where" to "By", i get an error of:

expected character arg 1{256} in access or evaluation of 'Number Col Box' , Number Col Box/*###*/(1)

 

The exact same code used to work with "Where".

 

The platform launches properly and the Tree looks identical, so i'm not sure why i cant address the display box.

 

Can someone help?

 

example = current data table () <<Distribution(
	Continuous Distribution(
		Column( :C.1.1 ),
		Quantiles( 0 ),
		Vertical( 0 ),
		Outlier Box Plot( 0 ),
		Customize Summary Statistics(
			Std Err Mean( 0 ),
			Upper Mean Confidence Interval( 0 ),
			Lower Mean Confidence Interval( 0 ),
			N Missing( 0 ),
			Minimum( 1 ),
			Maximum( 1 ),
			Range( 0 )
		)
	),
	By(:Col2)
	//Where( :Col2 == "S180079#1" )
);

reportEx = example << Report;
capability = reportEx[Number Col Box( 1 )];
show(capability << Get As Matrix);
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Trouble addressing display boxes in distribution platform

The "By" clause in the Distribution Platform generates a separate report structure for each level of the By variable.  Therefore, you need to add a substcript to the report reference to access the item needed. Below is an example showing the requirement

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

example = Distribution(
	Continuous Distribution(
		Column( :npn1 ),
		Quantiles( 0 ),
		Vertical( 0 ),
		Outlier Box Plot( 0 ),
		Customize Summary Statistics(
			Std Err Mean( 0 ),
			Upper Mean Confidence Interval( 0 ),
			Lower Mean Confidence Interval( 0 ),
			N Missing( 0 ),
			Minimum( 1 ),
			Maximum( 1 ),
			Range( 0 )
		)
	),
	By( :site )
);

reportEx = example << Report;

For( i = 1, i <= N Items( reportex ), i++, 

	capability = (reportEx[i])[Number Col Box( 1 )];
	Show( capability << Get As Matrix );

);
Jim
0 Kudos
3 REPLIES 3
txnelson
Super User

Re: Trouble addressing display boxes in distribution platform

The "By" clause in the Distribution Platform generates a separate report structure for each level of the By variable.  Therefore, you need to add a substcript to the report reference to access the item needed. Below is an example showing the requirement

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

example = Distribution(
	Continuous Distribution(
		Column( :npn1 ),
		Quantiles( 0 ),
		Vertical( 0 ),
		Outlier Box Plot( 0 ),
		Customize Summary Statistics(
			Std Err Mean( 0 ),
			Upper Mean Confidence Interval( 0 ),
			Lower Mean Confidence Interval( 0 ),
			N Missing( 0 ),
			Minimum( 1 ),
			Maximum( 1 ),
			Range( 0 )
		)
	),
	By( :site )
);

reportEx = example << Report;

For( i = 1, i <= N Items( reportex ), i++, 

	capability = (reportEx[i])[Number Col Box( 1 )];
	Show( capability << Get As Matrix );

);
Jim
0 Kudos
abdulj
Community Trekker

Re: Trouble addressing display boxes in distribution platform

Great - that worked.

 

for future reference, where or how would i have been able to tell that this was the case with these reports?

0 Kudos
txnelson
Super User

Re: Trouble addressing display boxes in distribution platform

show(n items(report(example)));
Jim
0 Kudos