How to pass variable name and column name with string in ggplot
This article mainly explains "how to use string to transfer variable name column name in ggplot". The explanation in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn how to use string to transfer variable name column name in ggplot.
Use get or! Methods:
Ggplot (rates.by.groups, aes (x=name, y=rate, colour= get (column), group=get (column) ggplot (rates.by.groups, aes (x=name, y=rate, colour=! (column), groupkeeper! (column)))
Using aes_string method
F