Hi Ian,

Recently there were a few posts with related issues. I guess the easiest
way to fix it is 1. do it tile by tile and add the results (I assume that
given the resolution the original source data won't be 1 big file but
multiple tiles) - this is R independent 2. use a similar approach in R
itself by using one of several parallel processing options (clusterR,
foreach, snow, ??).

This will give you a speed bump of roughly 4x on an average (multi-core)
computer, more if you have a beefy desktop or cluster at your disposal.

Cheers,
K



On Thu, Sep 12, 2013 at 11:28 AM, I. McCallum <mccallum@iiasa.ac.at> wrote:

> Dear All,
> I have a large global raster, with 300m resolution, 10 classes.
> I would need a sum of the cell count in each class.
> Frequency(raster) would be perfect, but its slow for such large datasets.
> I am wondering if there is a faster way to obtain the same results?
>
> Many thanks
> Ian
>
>
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/Frequency-Slow-on-Large-Raster-Layer-tp7584591.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
>

	[[alternative HTML version deleted]]

