plus-.uneval: Addition for 'aes()' and 'aes_string()'

Description Usage References Examples

Description

+.uneval is a helper function to allow adding aes and aes_string in ggplot2

Usage

1
2
## S3 method for class 'uneval'
a + b

References

http://stackoverflow.com/questions/28777626/how-do-i-combine-aes-and-aes-string-options

Examples

1
2
3
4
5
6
v1 <- "mpg"
v2 <- "qsec"
ggplot(mtcars, aes(x=wt)) + ylab("") +
   geom_line(aes_string(y=v1) + aes(color="one")) +
   geom_line(aes_string(y=v2) + aes(color="two")) +
   scale_color_manual(name="Val", values=c(one="#105B63",two="#BD4932"))

stefanavey/aveytoolkit documentation built on March 5, 2020, 12:49 a.m.