nse
How to use a variable to specify column name in ggplot
Note: the solution in this answer is “soft-deprecated”. See the answer below using .data[[ for the currently preferred method. You can use aes_string: f <- function( column ) { … ggplot( rates.by.groups, aes_string(x=”name”, y=”rate”, colour= column, group=column ) ) } as long as you pass the column to the function as a string (f(“majr”) rather … Read more