Here is a happy new year picture from R and ggplot2.
Probably one of the most frequently asked question is that geom_line() does not draw lines.
This is because x variable is factor.
ggplot2 does not support drawing image files by default, but it is easy to draw images for background using ggplot2.
ggplot2 does not support ts plot by default, but easily plot after brief data transformation.
Sometimes I need to draw mathematical functions only by specifying the xlim and without read data.
stat_function() can handle this.
Basic form is:
qplot(c(0, 2), stat="function", fun=exp, geom="line") # or ggplot(data.frame(x=c(0, 2)), aes(x)) + stat_function(fun=exp)