Tables->Summary is the way to create data tables that aggregate and summarize data. The Summary() message is the JSL way to create the data table.
Data Table( "Big Class" ) << Summary(
Group( :age, :sex ),
N,
Freq( "None" ),
Weight( "None" )
);
In contrast, the Summarize() function collects summary statistics for a data table and stores them in variables. This is useful if you need to use the summary statistics elsewhere in your script.
Summarize(g=by(age, sex), c=count());
show(g, c);
output:
g:{{"12", "12", "13", "13", "14", "14", "15", "15", "16", "16", "17",
"17"}, {"F", "M", "F", "M", "F", "M", "F", "M", "F", "M", "F", "M"}}
c:[5,3,3,4,5,7,2,5,2,1,1,2]
-Jeff