Image down below is the first head(10) of the data frame.
Here's what I want to do. If the word "facebook" , "instagram", "youtube" is included in 'source' variable, change referral -> social in 'medium' variable.
I guess I can use if statement also filter function.., but I'm just stuck here and don't know where to start.. I'd like to know the technique for this.
referral2 <- mutate(referral, medium = ifelse( ))
Thanks..!

Aucun commentaire:
Enregistrer un commentaire