What is the fastest way to generate Vector Columns from a tall table in JMP?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
// Data table summary
// → Data Table( "Summary of Big Class Families grouped by age etc." )
tmp = dt << Summary( Group( :age, :sex, :height, :weight ) );
// New formula columns
tmp << New Column( "Rank", Formula( Col Rank( 1, :age, :sex ) ) );
// Split data table
// → Data Table(
// "Split of Summary of Big Class Families grouped by age etc. by Rank[age]"
// )
final = tmp << Split( Split By( :Rank ), Split( :height, :weight ), Group( :age, :sex ) );
final << New Column( "heights",
Expression,
set each value(
Matrix( {:height 1, :height 2, :height 3, :height 4, :height 5, :height 6} )
)
);
final << New Column( "weights",
Expression,
set each value(
Matrix( {:weight 1, :weight 2, :weight 3, :weight 4, :weight 5, :weight 6} )
)
);
final << Delete Columns({:height 1, :height 2, :height 3, :height 4, :height 5, :height 6,:weight 1, :weight 2, :weight 3, :weight 4, :weight 5, :weight 6})
NB: I don't need the missing entries.