powered by
separate numeric x into bins
hist_bins(x, bins = 10, lim = c(min(x), max(x)), breaks = NULL, sort = FALSE)
tibble
numeric vector
bins number, defaults to 10
the min and max limits of bins, default as c(min(x), max(x))
c(min(x), max(x))
assign breaks directly and will ignore bins and lim
bins
lim
sort the result tibble
x <- dplyr::pull(mini_diamond, price, id) hist_bins(x, bins = 20)
Run the code above in your browser using DataLab