Quantile breaks data into groups that each have the same number of observations
quantile_breaks(k, df)
A vector of numeric values of computed breaks
library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
#> Reading layer `Guerry' from data source
#> `/Users/runner/work/_temp/Library/rgeoda/extdata/Guerry.shp'
#> using driver `ESRI Shapefile'
#> Simple feature collection with 85 features and 29 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: 47680 ymin: 1703258 xmax: 1031401 ymax: 2677441
#> Projected CRS: NTF (Paris) / Lambert zone II
quantile_breaks(k=5, guerry['Crm_prs'])
#> [1] 13270.5 17704.5 21476.5 26743.5