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:   Wed, 16 Jul 2008 02:59:27 -0700
Reply-To:   fomcl@yahoo.com
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Albert-jan Roskam <fomcl@yahoo.com>
Subject:   Re: Search for a value in all variables?
Comments:   To: "D.R. Wahlgren" <dwahlgren@projects.sdsu.edu>
In-Reply-To:   <p0624081cc4a285bf5563@[10.0.1.2]>
Content-Type:   text/plain; charset=us-ascii

Hi,

Before using COUNT, you could convert the string variables to their numerical equivalent using the NUMBER function. compute new = number(old, f5).

Cheers!! Albert-Jan

--- On Tue, 7/15/08, D.R. Wahlgren <dwahlgren@projects.sdsu.edu> wrote:

> From: D.R. Wahlgren <dwahlgren@projects.sdsu.edu> > Subject: Re: Search for a value in all variables? > To: SPSSX-L@LISTSERV.UGA.EDU > Date: Tuesday, July 15, 2008, 6:52 PM > 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

===================== 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