I encounter an error when trying to use variable columns in the Split platform. Does anyone know why this is not working, and how to resolve it? JMP 18.2.0.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// These all work.
dt << Split( Split By( :sex ), Split( :height, :weight ), Group( :name, :age ), Output Table( "Split of Big Class 1" ) );
dt << Split( Split By( :sex ), Split( {:height, :weight} ), Group( {:name, :age} ), Output Table( "Split of Big Class 2" ) );
dt << Split(
Split By( Column( dt, "sex" ) ),
Split( Column( dt, "height" ), Column( dt, "weight" ) ),
Group( Column( dt, "name" ), Column( dt, "age" ) ),
Output Table( "Split of Big Class 3" )
);
dt << Split(
Split By( Column( dt, "sex" ) ),
Split( {Column( dt, "height" ), Column( dt, "weight" )} ),
Group( {Column( dt, "name" ), Column( dt, "age" )} ),
Output Table( "Split of Big Class 4" )
);
// This does not work.
split_by_col = Column( dt, "sex" );
split_cols = {Column( dt, "height" ), Column( dt, "weight" )};
group_cols = {Column( dt, "name" ), Column( dt, "age" )};
dt << Split( Split By( split_by_col ), Split( split_cols ), Group( group_cols ), Output Table( "Split of Big Class 5" ) );