Nicktz
5/31/2016 - 2:55 PM

Apply lazeyeval over multiple columns

If e.g. a mutate wants to be done on multiple columns, we could use lapply together with lazyeval:

colfilter <- 
  lapply( ColumnNames, function(cols) lazyeval::interp(~Funcation(a), 
                                                       .values = list(a = as.name(cols))) )
df %>% mutate_( .dots = colfilter )