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
-
MODE
keyword introduced. -
OVERWRITE
keyword introduced.
Release 17.0
-
AGGREGATE
runs without a break variable.
Release 22.0
CLT
,CGT
,CIN
, andCOUT
functions introduced.
Example
AGGREGATE
/OUTFILE='/temp/temp.sav'
/BREAK=gender
/age_mean=MEAN(age).