Lucas:
DATASET DECLARE aggr_id.
AGGREGATE OUTFILE = 'aggr_ID' /PRESORTED /BREAK = id_a_new
/A1 TO A250 = MAX (A1 TO A250).
This should work, so long as A1 to A250 are consecutive in the data
file.
--jim
-----Original Message-----
From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of
Lucas Bremer
Sent: Wednesday, January 28, 2009 10:09 AM
To:
[hidden email]
Subject: efficient aggregation
Hey everybody,:
is there a way to simplify my syntax?In my sample there are more than
250
variables and for all of them I use the same "aggregate function".
DATASET DECLARE aggr_ID.
AGGREGATE
/OUTFILE='aggr_ID'
/PRESORTED
/BREAK=ID_A_New
/A1_max=MAX(A1)
/A2_max=MAX(A2)
/A3_max=MAX(A3)
/A4_max=MAX(A4)
/A5_max=MAX(A5)
/A6_max=MAX(A6)
/A7_max=MAX(A7)
/A8_max=MAX(A8)
/A9_max=MAX(A9)
/A10_max=MAX(A10).
And is it possible to retain the old variable names A1, A2 and so on?
I hope there is an easy solution J
Thanks in advance.
Lucas
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD