hi Jim
you can do it with tabulate but i find it difficult to enplane in words the delicate positioning of the variables by drag and drop so here are two alternative scripts.
// create a source data table
dt1 = New Table( "source data",
Add Rows( 8 ),
New Column( "Person",
Numeric,
Continuous,
Format( "Best", 15 ),
Set Values( [1, 2, 2, 3, 3, 4, 5, 5] )
),
New Column( "Sex",
Character( 16 ),
Nominal,
Set Values( {"F", "F", "F", "M", "M", "M", "F", "F"} )
)
);
// option 1
Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Analysis Columns( :Person ), Statistics( N Categories ) ),
Row Table( Grouping Columns( :Sex ) )
)
);
// option 2
Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Statistics( N Categories ) ),
Row Table( Grouping Columns( :Sex ), Analysis Columns( :Person ) )
)
);