
Last chance! 50% off unlimited learning
Sale ends in
classes=FALSE
, cells with values and cells with NA
.edge(x, ...)
classes
Logical. If TRUE
all different values are (after rounding) distinguished, as well as NA
. If FALSE
, the only comparison is between values and NA
type
Character. 'both' (default), 'inner', or 'outer' to distinguish cells with values versus cells with NA
.
asNA
Logical. Should non-edge cells by NA
rather than FALSE
(zero)?
asZero
Logical. If asNA=TRUE
, should cells that are not an edge, and not NA
on the input RasterLayer be returned as zero?
filename
Character. Filename for the output RasterLayer
format
Character. Output file type. See writeRaster
datatype
Character. Output data type. See dataType
overwrite
Logical. If TRUE
, "filename" will be overwritten if it exists
progress
Character. Valid values are "text", "tcltk", "windows" (on that platform only) and ""
}focal
, clump
r <- raster(nrow=18, ncol=36)
r[] <- round(c(1:324, 324:1)/324)
r[r==0] <- NA
e <- edge(r, type='inner', asNA=TRUE, asZero=TRUE)
Run the code above in your browser using DataLab