tags:

views:

67

answers:

1

I've recently installed the latest version of ggplot, by downloading the source from CRAN and then running

install.packages("/path/to/ggplot2_0.8.8.tar.gz", repos = NULL, type="source")

Now, running the first example from geom_tile()'s documentation on the ggplot2 website:

library('ggplot2')
pp <- function (n,r=4) { 
    x <- seq(-r*pi, r*pi, len=n) 
    df <- expand.grid(x=x, y=x) 
    df$r <- sqrt(df$x^2 + df$y^2) 
    df$z <- cos(df$r^2)*exp(-df$r/6) 
    df 
} 
p <- ggplot(pp(20), aes(x=x,y=y)) 
p + geom_tile(aes(fill=z))

gives the following error:

Error in get("make_aesthetics", env = x, inherits = TRUE)(x, ...) : 
  could not find function "empty"

Anyone got any ideas?

> sessionInfo()
R version 2.10.1 Patched (2010-01-25 r51042) 
x86_64-apple-darwin9.8.0 

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] ggplot2_0.8.8 proto_0.3-8   reshape_0.8.3 plyr_0.1.9
+1  A: 

You also need to update the plyr package.

other attached packages:
[1] ggplot2_0.8.8  proto_0.3-8    reshape_0.8.3  plyr_1.1   
rcs
Awesome. Is there any way I could have found that out on my own?
Mike Dewar
Well, you could have ran `install.packages()` with the `dependencies = TRUE` option...
Harlan