For example I have a column of values
unique(df$Animals)
"Giraffe","Elephant", "Lion","Cheetah","Dingo"
I want the conditional statement to completely skip when df$Animal is equal to "Dingo"
df$Spotted<-ifelse(!is.na(df$Animals),
"Yes", "No")
Normally the script would assign Yes to all values which i am ok, but i don't want it to even read or go over when it is Dingo.
Aucun commentaire:
Enregistrer un commentaire