Assign categories to the values in a raster
n will determine
breaks based on the value-range
obj so that the values are assigned to n categories.
breaks is mostly usefull when values are to be non-linear,
log(min:max)*max/log(max), but could also be
max, length.out = 21), which corresponds to
n = 20.
RasterLayer of the same dimension as
obj, in which
the cells have the category number into which their values fall.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.