Use the big class form:
1. Starting from line 20, extract a subset of the data from this row to the previous 19 rows.
2. Classify this subset according to age and summarize height and weight.And one by one concatenation summary results.
Thanks!
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
j = 1;
For( j = 20, j <= N Row( dt ), j++,
dt << Select Where( j - 20 < Row() <= j );
d3 = dt << Subset( Output Table( "tab" ), Selected Rows( 1 ), selected columns( 0 ) );
d1 = d3 << Summary(
Sum( height ),
Sum( weight ),
Subgroup( age ),
Freq( 0 ),
Weight( 0 ),
Link to original data table( 0 ),
statistics column name format( "column" )
);
If( j == 20,
d2 = d1;
d2 << setName( "tmp" );
,
Current Data Table( d2 );
d2 << Concatenate( Data Table( d1 ), Append to first table );
Close( d1, nosave );
);
Close( d3, nosave );
);