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