Re: [R] ggplot2 problem

From: Eric <rmailbox_at_justemail.net>
Date: Wed, 26 Nov 2008 18:19:35 -0800

aes() does not have an argument, "Year" but it does have an argument "x" so try:

df <- data.frame(Year = rep(1:5,2))
m <- ggplot(df, aes(x=Year))
m + geom_bar()

(It works for me.)

Eric

steve wrote:
> I'm using ggplot2 2.0.8 and R 2.8.0
>
> df = data.frame(Year = rep(1:5,2))
> m = ggplot(df, aes(Year=Year))
> m + geom_bar()
>
> Error in get("calculate", env = ., inherits = TRUE)(., ...) :
> attempt to apply non-function
>
> ______________________________________________
> R-help_at_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.



R-help_at_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. Received on Thu 27 Nov 2008 - 02:22:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 27 Nov 2008 - 06:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive