I have a data frame and one of the columns contain both continuous data and NA. I want to recode all continuous data as one level of categorical data and the NA as another using if_else() and is.na(). How can I do it?
Example data frame:
df<-tibble(id=1:10,score=c(3,1,-3,-9,NA,NA,12,NA,5,NA))
How can I recode all the numbers into "results" and NA into "no_results"?