natural_breaks: Natural Breaks (Jenks)

View source: R/utils.R

natural_breaksR Documentation

Natural Breaks (Jenks)

Description

Natural Breaks group data whose boundaries are set where there are relatively big differences.

Usage

natural_breaks(k, df)

Arguments

k

A numeric value indicates how many breaks

df

A data frame with selected variable. E.g. guerry["Crm_prs"]

Value

A vector of numeric values of computed breaks

Examples

library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
natural_breaks(k=5, guerry['Crm_prs'])

GeoDaCenter/rgeoda documentation built on Dec. 20, 2024, 11:18 p.m.