Description Usage Arguments Value See Also Examples
View source: R/modify.operators.R
The permutation of a set of cell values leads to a systematic (re)arrangement of all the members of the set.
1 |
obj |
[ |
type |
[ |
by |
[ |
A RasterLayer
of the same dimensions as obj
, in which
all values have been permuted according to the chosen type
.
Other operators to modify cell values: rBinarise
,
rCategorise
, rDistance
,
rFillNA
, rOffset
,
rRange
, rSubstitute
1 2 3 4 5 6 7 8 9 10 11 | input <- rtRasters$continuous
# invert background/foreground
visualise(raster::stack(input, rPermute(input)))
# sort patch values ascending
patches <- rPatches(rBinarise(input, thresh = 30))
visualise(raster::stack(patches, rPermute(patches, type = "ascending")))
# cycle values backwards by 30
visualise(raster::stack(input, rPermute(input, type = "cycle", by = -30)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.