// JSL Sample Script: Analyze Big Class Data
// 1. Set default to here to keep variables local
Names Default To Here( 1 );
// 2. Open a sample data table
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// 3. Create a new column with a formula
dt << New Column( "BMI",
Numeric,
"Continuous",
Format( "Fixed Dec", 5, 2 ),
Formula( :weight / (:height * :height) * 703 )
);
// 4. Generate a Graph Builder report
graph = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 5 ) ), Smoother( X, Y, Legend( 6 ) ) )
);
Here is a sample JSL coded block