AGGREGATE
AGGREGATE aggregates groups of cases in the active dataset into single cases and
creates a new aggregated file or creates new variables in the active dataset that contain aggregated
data.
AGGREGATE [OUTFILE={'savfile'|'dataset'}]
{* }
[MODE={REPLACE }] [OVERWRITE={NO }]
{ADDVARIABLES} {YES}
[/MISSING=COLUMNWISE] [/DOCUMENT]
[/PRESORTED] [/BREAK=[varlist[({A})]][varlist...]]
{D }
/aggvar['label'] aggvar['label']...=function(arguments)
[/aggvar ...]
This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.
Syntax for
the AGGREGATE command can be generated from the Aggregate Data dialog.
Release History
Release 13.0
-
MODEkeyword introduced. -
OVERWRITEkeyword introduced.
Release 17.0
-
AGGREGATEruns without a break variable.
Release 22.0
CLT,CGT,CIN, andCOUTfunctions introduced.
Example
AGGREGATE
/OUTFILE='/temp/temp.sav'
/BREAK=gender
/age_mean=MEAN(age).