(This article was first published on Steven Mosher's Blog, and kindly contributed to R-bloggers)
Whew,
For a few hours last night I struggled with a bug, err several bugs. In the end some of the bugs were mine, some of them were “upstream” and some of them were far “upstream”. Image bugs in R 2.13.1. But the math bugs ( or flat out errors on my part) have all been fixed. And the verification of the results is done. version 1.3 should be available for download here in bit, I just need to pretty up some code in the demos.
The process of using raster bricks to create a global average is a bit tricky if you are not used to thinking in simple operations.
Anyway, I worked my way through my own stupidity and ended up with this
To leave a comment for the author, please follow the link and comment on his blog: Steven Mosher's Blog.
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...


Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).