st_unidisc {gdverse} | R Documentation |
Function to classify univariate vector to interval, a wrapper of classInt::classify_intervals()
.
st_unidisc(x, k, method = "quantile", factor = FALSE, seed = 123456789, ...)
x |
A continuous numerical variable. |
k |
(optional) Number of classes required, if missing, |
method |
Chosen classify style: one of "fixed", "sd", "equal", "pretty", "quantile", "kmeans",
"hclust", "bclust", "fisher", "jenks", "dpih", "headtails", "maximum", or "box". Default is |
factor |
(optional) Default is |
seed |
(optional) Random seed number, default is |
... |
(optional) Other arguments passed to |
A discrete vector after being discretized.
Wenbo Lv lyu.geosocial@gmail.com
xvar = c(22361, 9573, 4836, 5309, 10384, 4359, 11016, 4414, 3327, 3408,
17816, 6909, 6936, 7990, 3758, 3569, 21965, 3605, 2181, 1892,
2459, 2934, 6399, 8578, 8537, 4840, 12132, 3734, 4372, 9073,
7508, 5203)
st_unidisc(xvar, k = 6, method = 'sd')