Description Usage Arguments Details Value See Also Examples
View source: R/measure.operators.R
Calculate the cell-adjacency matrix for a raster
1 | mAdjacency(obj, type = "like", count = "double", layer = NULL)
|
obj |
[ |
type |
[ |
count |
[ |
layer |
[ |
In case type = "like"
, only the diagonal of the adjacency
matrix is returned, in case type = "paired"
, the complete adjacency
matrix is returned.
a data.frame
of the frequency of adjacencies of the values in
obj
.
Other generic metrics: mArea
,
mNumber
, mPerimeter
,
mValues
1 2 3 4 5 6 7 8 9 10 11 | cat <- rtRasters$categorical
bin <- rBinarise(rtRasters$continuous, thresh = 40)
# double count like adjacencies
mAdjacency(obj = cat)
# paired adjacencies
mAdjacency(obj = cat, type = "paired")
# adjacencies with single count
mAdjacency(obj = bin, count = "single")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.