I am trying to plot multiple variable correlation plots on one page - but the points aren\'t being plotted correctly when I use a for loop. They are fine if I create each plot i
I encountered similar problem. Here's my solution: change the mapping parameter to aes_string() in funtion ggplot
mapping
aes_string()
plot_list[[i]] <- ggplot(data=master, aes_string(get(x), get(y))) + geom_point() + geom_abline(slope=slope, intercept=intercept)
Hope this helps.