I have a list of dataframes with common columns that I need to merge, but I need to coerce certain columns to character type first prior to merging. To fix this, I wrote the following:
master_list <- lapply(master_list, function(x) x %>%
mutate_at(.vars = vars(master_list$x$'send date',
master_list$x$'send time',
master_list$x$'Monthly',
master_list$x$'InteractionEventDate'),
.funs = as.character))
However, when I look at these columns in any one dataframe in my list, the change was not made (e.g. InteractionEventDate is still a double), despite no error being thrown by the above line of code. I based it partially on the answer to this post, which used the now deprecated mutate_each.