In a survey, I put a question where people can leave any comments. If a participant left any text in the response, I'd recode it as TRUE, but if they did not put anything, I'd recode it as FALSE. (So I am trying to convert a character type variable into a logical type.)
I tried to use:
dataset$variable <- dataset$variable %>%
plyr::revalue(c("NA"= FALSE, else = TRUE))
But else = TRUE is not working as I wanted. Does anyone know how I can fix this?