I am working with an SPSS data set with string data. I noticed that one of the string values in the data set is "I probably wouldn't do that" – note the apostrophe. In my syntax, the cell with a value of "I probably wouldn't do this" is part of a conditional statement, as in…
Else if (I6l_0='I would never do this') or (I6l_0='I probably wouldn't do this').
However, because the conditional string statement has an apostrophe, SPSS is interpreting that as the end of the string statement, so the syntax is not correct.
I thought about editing the data file so that everywhere it says "I probably wouldn't do this", I could take out the apostrophe, then include the de-apostrophed conditional statement in my syntax. My efforts to find an easy way to take out all of the apostrophes from the data file have thus far failed – I'd like to do a "Find" and "Replace" like in a word processing program, but "Find" in the SPSS menu does not seem to work that way (or I am using it incorrectly). Is anyone aware of an easy way to de-apostrophe the data set?
Other ideas I had were to Sort the Cases by the values of the pertinent variables and edit them on a case-by-case basis… or recode the string value to a numeric one…. Or read the file into something like Excel and do a Find and Replace…. but was wondering if there was an easy way to do the job within SPSS.
So -- is anyone aware of an easy way to de-apostrophe the data set?
Thanks - Janet
------------------------------
Jaycee
------------------------------