Learn R Programming

baizer (version 0.8.0)

hist_bins: separate numeric x into bins

Description

separate numeric x into bins

Usage

hist_bins(x, bins = 10, lim = c(min(x), max(x)), breaks = NULL, sort = FALSE)

Value

tibble

Arguments

x

numeric vector

bins

bins number, defaults to 10

lim

the min and max limits of bins, default as c(min(x), max(x))

breaks

assign breaks directly and will ignore bins and lim

sort

sort the result tibble

Examples

Run this code

x <- dplyr::pull(mini_diamond, price, id)

hist_bins(x, bins = 20)

Run the code above in your browser using DataLab