search for: indicatornam

Displaying 1 result from an estimated 1 matches for "indicatornam".

Did you mean: indicatornames
2013 Jan 02
0
How to use geom_line (from ggplot) with aesthetics in a function?
...unction, which takes a few vectors and a few strings (column names) as arguments, builds the data frame and then produces a chart. Building the data frame is easy, but how should this function look like in the geom_line code? The only solution which I found is something along the lines: for( ii in indicatorNames ) { gg = gg + geom_line( aes_string( x="DATE", y=ii, color=paste( sep="", "\"", ii, "\"" ) ), size=0.75 ) } Where indicatorNames is the name of the columns and DATE is the first column of the data frame. What I don't like, not to menti...