- x
SpatRaster or SpatVector of polygons
- n
numeric. Can be a single positive integer to indicate the number of parts (SpatVector) or the number of splits (SpatRaster).
If x
is a SpatRaster, it can also be a vector with values -2, -1, 1, or 2. Where 1 means one split and 2 means two splits, and the negative sign indicates an East-West (vertical) split as opposed to a North-South split.
If x
is a SpatVector it can be a list with at least one of these elements: horizontal
and vertical
that specify the proportions of the area that splits should cover. This can either be a single fraction such as 1/3, or a sequence of fractions in ascending order such as c(1/4, 1/2, 1)
- start
character. To indicate the initial direction of splitting the raster. "ns" for North-South (horizontal) or "ew" for East-West (vertical)
- as.raster
logical. If FALSE
a SpatVector is returned. If FALSE
, a SpatRaster is returned. If NA
a list with a SpatRaster and a SpatVector is returned
- na.rm
logical. If TRUE
cells in x
that are NA
are not included in the output
- w
SpatRaster with, for example, environmental data
- alpha
numeric. One or two numbers that act as weights for the x and y coordinates
- ...
additional arguments such as iter.max
passed on to kmeans