Here is a simple script to do what you want
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/big class.jmp" ); dt << set table variable( "my variable", Col Sum( If( Selected(), :height, . ) ) );
They are referenced the same way you would reference a column
dt = Open( "$SAMPLE_DATA/big class.jmp" ); dt << Select Randomly(0.1); dt << set table variable( "myvariable", Col Sum( If( Selected(), :height, . ) ) ); Print(:myvariable);
If you want to do this without using a script, first select the rows (using whatever method you want). Then, under Rows-Select-Name selection in column, you create a column of 0 and 1 that identifies the selected rows. Then create a new column using the Column Sum formula and put the newly created Named selection in column as the By variable. The result will show the sum for the selected and unselected rows.
There are no labels assigned to this post.