I am trying to create binary variable inside the readmitted column in R :
if the value is is <30 then the the variable should = YES and anything else should = NO. This is the code I have but I am not sure how to get the else values.
HospitalData$readmitted <- case_when(HospitalData$readmitted <30 ~ "YES" )