vendredi 18 décembre 2020

How do i use "if" and "and" condition in R data frame

i want to update in "Remark" column using condition on other multiple column

RBNRFinal$Remarks<- ifelse(RBNRFinal$restock_date!="NA","Restock Done"," ") # this works fine

RBNRFinal$Remarks<- ifelse(RBNRFinal$Remarks ==" "& RBNRFinal$dispatched_flag==1,"GP Done"," ") # dont get " GP Done" values

please help me in using correct "IF" and "And" or & condition in the data frame

Aucun commentaire:

Enregistrer un commentaire