iris$Species %<>% str_replace("vir", "foo")
iris %>% mutate(Species = Species %>% str_replace("vir", "foo"))
iris %>% mutate_inplace(Species, str_replace("vir", "foo"))
mutate_inplace = function(df, variable, expr){
quoVar <- enquo(variable)
varName = quo_name(quoVar)
mutate(df, !!varName := quoVar %>% !!enquo(expr))
}
Error in mutate_impl(.data, dots) :
Column `Species` is of unsupported type quoted call
--
You received this message because you are subscribed to the Google Groups "manipulatr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manipulatr+unsubscribe@googlegroups.com.
To post to this group, send email to manip...@googlegroups.com.
Visit this group at https://groups.google.com/group/manipulatr.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to manipulatr+...@googlegroups.com.