Last chance! 50% off unlimited learning
Sale ends in
classes=FALSE
, cells with values and cells with NA
.## S3 method for class 'RasterLayer':
edge(x, filename="", type='inner', classes=FALSE, directions=8, ...)
TRUE
all different values are (after rounding) distinguished, as well as NA
. If FALSE
(the default) only edges between NA
and non-NA
cells are consideredwriteRaster
NA
focal
, clump
r <- raster(nrow=18, ncol=36, xmn=0)
r[150:250] <- 1
r[251:450] <- 2
plot( edge(r, type='inner') )
plot( edge(r, type='outer') )
plot( edge(r, classes=TRUE) )
Run the code above in your browser using DataLab