LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 28 May 2003 07:53:29 -0500
Reply-To:     "Peck, Jon" <peck@spss.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Peck, Jon" <peck@spss.com>
Subject:      Re: Deleting Variables
Content-Type: text/plain; charset="us-ascii"

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. freq v2.

This requires only the data pass that would have been done for the Frequencies procedure.

-----Original Message----- From: Richard Ristow [mailto:wrristow@mindspring.com] Sent: Tuesday, May 27, 2003 10:35 PM To: SPSSX-L@LISTSERV.UGA.EDU 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

ADD FILES/FILE=*/DROP=min.

(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.)


Back to: Top of message | Previous page | Main SPSSX-L page