get_breaks: Calculate breaks to discretize a numeric vector, using...

View source: R/discretize.R

get_breaksR Documentation

Calculate breaks to discretize a numeric vector, using different methods

Description

Calculate breaks to discretize a numeric vector, using different methods

Usage

get_breaks(x, n = 5, method = break_methods())

Arguments

x

a numeric vector

n

integer indicating the number of intervals/bins desired

method

a character of length 1, indicating the method to use. Possible values are c("jenks", "isowidth", "quantile")

Value

a numeric vector of length <= n + 1.

Examples

get_breaks(1:100, 5)

edalfon/efun documentation built on June 23, 2024, 4:17 a.m.