Hi Juan, Each geom can have it's own stat, so stat_identity() doesn't change the stat used by geom_bar(). You need
ggplot(d, aes(x=x, y=y)) + geom_bar(stat="identity") Best, Ista 2011/6/8 Juan Carlos Borrás <jcbor...@gmail.com>: > 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! > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.