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