|Date: ||Wed, 28 May 2003 16:32:51 -0500|
|Reply-To: ||"Peck, Jon" <email@example.com>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||"Peck, Jon" <firstname.lastname@example.org>|
|Subject: ||Re: Deleting Variables|
|Content-Type: ||text/plain; charset="us-ascii"|
I misspoke: XSAVE avoids the extra data pass, not Save. (Un)fortunately the data pass was so fast that the case counter did not have time to tick on the second pass in my test problem, which had 200000 cases.
From: Peck, Jon
Sent: Wednesday, May 28, 2003 7:53 AM
Subject: RE: [SPSSX-L] Deleting Variables
One clarification: if you do something like drop the variable(s) and run a procedure, there is no extra data pass. For example
save outfile='e:\temp\fred.sav' /drop= v1.
This requires only the data pass that would have been done for the Frequencies procedure.
From: Richard Ristow [mailto:email@example.com]
Sent: Tuesday, May 27, 2003 10:35 PM
Subject: Re: [SPSSX-L] Deleting Variables
[RE-SENT, WITH REVISIONS MISSED THE FIRST TIME]
At 01:06 PM 5/27/2003 -0400, Mapp, Delicia wrote:
>Once I have calculated the variable 'totmin', I no longer need the
>variable 'min'. Is there a way in which I can delete this variable
>within my code?
Yes, but it requires rereading the SPSS working file as a whole; that
is, it is fairly slow. Any SAVE, XSAVE, GET FILE, ADD FILES, or MATCH
FILES statement can take a "DROP=" clause to list variables be omitted
from the loaded or saved file. The simplest way to drop a variable from
the current working file is
(You can drop any number of variables at once; and, if you're dropping
more than one, it's much faster if you do them all at once.)