mardi 7 janvier 2020

How do I rectify the error "argument "yes" is missing, with no default" [duplicate]

This question already has an answer here:

When I run the below code I get error "Error in ifelse(SER=='' & olddf$CONG=='Y' | olddf$DISAB == : argument "yes" is missing, with no default"

newdf<-olddf %>% mutate(ABFL=ifelse(olddf$Afl=='Y'| olddf$BFL=='Y', 'Y','N'),  SER=ifelse(SER=='' & olddf$CONG=='Y' | olddf$DISAB=='Y'| olddf$DTH=='Y' | 
                                     olddf$HOSP=='Y' | olddf$LIFE=='Y' | olddf$MIE=='Y'), 'Y', 'N')

Aucun commentaire:

Enregistrer un commentaire