Description Usage Arguments Details Value See Also Examples

Assign categories to the values in a raster

1 | ```
rCategorise(obj, breaks = NULL, n = NULL)
``` |

`obj` |
[ |

`breaks` |
[ |

`n` |
[ |

Using `n`

will determine `breaks`

based on the value-range
of `obj`

so that the values are assigned to n categories.

Assigning `breaks`

is mostly usefull when values are to be non-linear,
such as `log(min:max)*max/log(max)`

, but could also be ```
seq(min,
max, length.out = 21)
```

, which corresponds to `n = 20`

.

A `RasterLayer`

of the same dimension as `obj`

, in which
the cells have the category number into which their values fall.

Other operators to modify cell values: `rBinarise`

,
`rDistance`

, `rFillNA`

,
`rOffset`

, `rPermute`

,
`rRange`

, `rSubstitute`

1 2 3 4 5 6 7 8 9 | ```
input <- rtRasters$continuous
visualise(rCategorise(input, n = 5))
# use as algorithm in modify, to combine two iterations in one run
algorithm <- list(list(operator = "rCategorise", breaks = c(25, 50, 75, 90)),
list(operator = "rCategorise", breaks = log(1:5)*5/log(5)*20))
obj_mod <- modify(input, by = algorithm, merge = TRUE)
visualise(obj_mod)
``` |

EhrmannS/rasterTools documentation built on May 28, 2019, 8:24 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.