jeudi 31 janvier 2019

R will only use true statement in ifelse. False statement ignored for some reason

All results give pass even if math score is less than 50 when using the ifelse statement I'm new to R (2 weeks) and I have no clue as to why "fail" won't show up.

.

nosleep<- nosleep %>% + mutate(mathResult = ifelse('math score'>=50, "pass","fail"))

expected result: fail under 50 actual result: all pass

Aucun commentaire:

Enregistrer un commentaire