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]]

