I am trying to use the clump function to identify clumps in this raster and I am getting the following error message:
Error in if (cls[i] == "character") { :
missing value where TRUE/FALSE needed
I have no idea what is going wrong. Does anyone have any ideas? Thanks very much.
Here's the rest of my code
library(raster)
library(igrid)
chng00_12 <- raster("change00_12.tif")
lossClumps <- clump(chng00_12,
filename='lossClumps.tif',
directions=8,
gaps=FALSE)