0

I am analysing SPSS data in R. Answer alternatives in the SPSS do not come as a sequence on numbers like 1, 2, 3, 4, 5, 6, 7, but for example 1,2,3,98 or 1,2,98. There are also questions that go to 10. So last alternative is almost always 98. How can I change it to be a sequence of integers and not miss answer text?

Not sure what I should try, since it's different number of answer alternatives. Otherwise I would try to make all 98s to NA and then to 3 or 11.

Anna
  • 1
  • 1
  • 3
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Jun 12 '23 at 15:42
  • 1
    Note, though, that the consecutive numbers are still not meaningful in a sense that calculating a mean across the entire variable would be wrong. 98 is usually assigned to „don‘t know“ or sth. like that. – deschen Jun 12 '23 at 15:52

0 Answers0