lundi 8 février 2021

R mutate if conditions if in

have the following how can I mutate and create the variable s with if column "word" in data frame d == 1


d <- as.data.frame(d)


tidy_mydf_2 <- tidy_mydf %>% 
  mutate(s  = (word in d)*1)```


Aucun commentaire:

Enregistrer un commentaire