I have a database in which one column D2
is marked with 3 different variables NA
, Year
, Prefer Not To Answer
. I want to replace the Year
with the numeric answers in the second column D2_TEXT
I am using Rstudio and I have dplyr and tidyverse installed.
your_data <- mutate(your_data, D2 = ifelse(D2 == 'Year', D2_TEXT, D2))
Thank you Axeman