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 (July 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 15 Jul 2008 09:52:12 -0700
Reply-To:   "D.R. Wahlgren" <dwahlgren@projects.sdsu.edu>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   "D.R. Wahlgren" <dwahlgren@projects.sdsu.edu>
Subject:   Re: Search for a value in all variables?
In-Reply-To:   <5CFEFDB5226CB54CBB4328B9563A12EE09120245@hqemail2.spss.com>
Content-Type:   text/plain; charset="us-ascii" ; format="flowed"

At 11:42 AM -0500 7/15/08, Peck, Jon wrote: >Try the count command and use ALL or x TO y to specify the variables to check.

Thanks, Jon. Will this work with string variables included in the range? Can I specify (-8 or "-8") for the values to be counted?

thanks! Dennis

> >------Original Message------ >From: D.R. Wahlgren >To: SPSSX-L >ReplyTo: D.R. Wahlgren >Sent: Jul 15, 2008 2:28 AM >Subject: [SPSSX-L] Search for a value in all variables? > >Gang, >Is there a way to search for a specific value on *all* variables in a >data set without naming every variable in the syntax commands? For >example, if I want to locate every instance of a -8 (our code for a >refusal) across all 500+ variables in my data set, how would I go >about it? > >I'd like to do two things: 1) identify the case and variable for each >instance of a -8, and 2) create a new variable that simply flags the >presence of at least one -8 on the case with a dichotomous (0/1) >variable. > >Oh, and to complicate it just a bit more, a small number of the >variables are string. If they could be included in the search, that >would be great, but I would be ok with omitting them from this search >if there was a relatively simple way to do it (I'd rather not have to >name them all on a DROP subcommand but will if necessary.) > >I'm using v16 for Mac. > >thanks, >Dennis

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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


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