Is there an equivalent in one of the R raster packages of the spatial analyst command "Region Group, that gives a unique identifier to each region of contiguous cells with the same value? Thanks Nevil Amos