Hi Robert,

Thanks for the update. I use the expand=TRUE function now, this works fine.
And indeed it was the aggregate() operation that propagated into my
reclassification, causing me headaches.

Best,
Koen


On Mon, Jul 1, 2013 at 11:33 PM, Robert J. Hijmans <r.hijmans@gmail.com>wrote:

> Koen, Clearly there is something wrong with 'zones', and probably not
> with reclassify. The problem with zones probably stems from the error
> you can get when using aggregate(... , expand=F) that you reported in
> another message. Robert
>
> On Thu, Jun 27, 2013 at 1:21 AM, Koen Hufkens <koen.hufkens@gmail.com>
> wrote:
> > Hi all,
> >
> > I'm trying reclassify an image but I keep hitting upon the error:
> >
> > R <- reclassify(zones,rcl.r)
> >
> > Error in setValues(out, .Call("reclass", values(x), rcl, include.lowest,
>  :
> >   length(values) is not equal to ncell(x), or to 1
> >
> > If I plot the 'zones' RasterLayer I also get this error:
> >
> > plot(zones)
> >
> > Warning message:
> > In matrix(x, ncol = cr[1], nrow = cr[2], byrow = TRUE) :
> >   data length [25740] is not a sub-multiple or multiple of the number of
> > rows [159]
> >
> > where 'zones' is the output of the aggregate() function.
> >
> > Both are related as it does not occur if I use a smaller image although
> the
> > procedure is exactly the same.
> >
> > Any clues on why this is, and how to solve it?
> >
> > Thanks in advance,
> > Koen
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

