[R] The simplest bar graph with ggplot is difficult to realize

Juan Carlos Borrás jcborras at gmail.com
Wed Jun 8 17:30:19 CEST 2011


Dear all,
What is the simplest way of producing a bar graph using ggplot but
avoiding calling qplot?

That is, given:
d <- data.frame(x=seq(1,5), y=seq(1,5))

Why does the following line return an error?
ggplot(d, aes(x=x, y=y)) + stat_identity() + geom_bar(bindwidth=1)

Thanks in advance,
jcb!



More information about the R-help mailing list