Date: Thu, 28 Oct 2004 19:56:06 -0500
Reply-To: Richard Ristow <wrristow@mindspring.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <wrristow@mindspring.com>
Subject: Re: replacing a number
In-Reply-To: <200410282249.i9SMnL2V028456@listserv.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 05:49 PM 10/28/2004, Rodrigo Briceno wrote:
>[In my database] I have an id number (1653100) [entered] as 16531000,
>that is the same figure but with one more zero. [...] How can I change
>this specific data without affecting the other ones? There is nothing
>similar like find and replace in my spss v11.0.
First, if your file is MY_DATA.SAV, rename it to something like
"MY_DATA_bad_ID.SAV". (This is the principle that you NEVER change data
without keeping the unchanged copy. I'll admit that this case might be
considered an exception.)
If there's only one record with the bad ID, it's probably easiest to
open the file in the data editor, use the FIND function to find the bad
ID, change it by hand, and save as MY_DATA.SAV. If there are multiple
records, this syntax (untested) should do it. It's code with data in
it, which many people (including me) disapprove of, but I think it's
the easiest way in this case. If the variable is named ID,
GET FILE='MY_DATA_bad_ID.SAV'.
IF (ID=16531000) ID=1653100.
SAVE OUTFILE='MY_DATA.SAV'.
|