If you look at the raster package vignette (
http://cran.r-project.org/web/packages/raster/vignettes/Raster.pdf), you
will notice a few functions suitable for tasks you're trying to achieve.
For example, if you want to work on layers in RasterBrick object, you could
try stackApply().
You could also use it to calculate monthly average by passing an
appropriate indices argument which denotes to which month layer belongs to.

Best of luck,
Roman



On Fri, Dec 28, 2012 at 1:06 AM, ppanday <ppanday@clarku.edu> wrote:

> Hello all
>
> I have a raster bricklayer with 30 layers. Is there a way to extract
> area-average using a raster mask? Or if I have the same layer already
> masked, how would I compute area-average for the bricklayer?
>
> My other questions is if I have a raster bricklayer with 360 layers
> (months), how would I compute monthly average such that the output has 12
> layers.
>
> Thanks,
> Prajjwal
>
>
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/raster-extraction-tp7582124.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
In God we trust, all others bring data.

	[[alternative HTML version deleted]]

