I have a dataset, called 'survey'. In this I have rows of individual IDs, and columns with many questions. I need to recode the value in 1 column as NA and move the observation to the other column.
For example:
ID Fruit Vegetable
aaa NA grape
bbb NA tomato
ccc apple NA
ddd peach NA
I want to change the grape and tomato observations, belonging to ID aaa and bbb to put them into the fruit column (survey respondents put them in the wrong column) and leave NA behind.
To look like:
ID Fruit Vegetable
aaa grape NA
bbb tomato NA
ccc apple NA
ddd peach NA
Thank you very much