Hello,
Something I've struggled greatly with is how to Get *something* from platforms. In this case, it's the linear fit equation just under "Linear Fit". The Properties and Show Tree Structure menu both show different text exit boxes, so I've tried to grab them both and used Get (which isn't recognized by the platform, or maybe just the object), and Get text. Both do not grab the text I require. Any ideas?
Another issue is that 6 reports are generated, where 2 of them should be, since summarize creates a list of unique values in :sex and that's what how many times the for loop is iterating. The reporting is also filtered for these values.
Names default to here(1);
clear log();
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
summarize( gen_lst = by( dt:sex ) );
for( i = 1, i <= N Items( gen_lst ), i++,
// Create visualization, save to target
vis = eval expr( eval(
Bivariate(
Y( :weight ),
X( :height ),
Where( :sex == expr( gen_lst[i] ) )
)
) );
// Fit: Linear
vis << Fit Line( {Line Color( {255, 000, 000} )} );
// Tries to copy equation in "Linear Fit"
try( eqs_tmp1 = report(vis)["Linear Fit", TextEditBox(1)] << Get text );
try( eqs_tmp4 = report(vis)[TextEditBox(4)] << Get text );
try( print( eqs_tmp1 ) );
try( print( eqs_tmp4 ) );
);
Learning every day!