I am looking to use the ifelse() with mutate(), and if the condition is false, leave the value what is. Here is what I am working with:
df <- df %>% mutate(column1 = ifelse(is.na(column1), 0, "insert code to do nothing"))
Aucun commentaire:
Enregistrer un commentaire