Description Usage Arguments Value See Also Examples
Compute a reasonable default number of bins based on the data and different types of rules.
1 | find_nbins(x, rule = c("FD", "RR", "Scott", "sqrt", "Sturges"), na_rm = TRUE)
|
x |
a numeric vector. |
rule |
a character string matching to a rule to use to determine number of bins. |
na_rm |
logical whether to remove ( |
an integer with reasonable number of bins.
The following wiki for a discussion on different "rules-of-thumb". Additionally, the bigvis package and sources therein.
1 2 3 4 | set.seed(42L)
find_nbins(rnorm(1000))
find_nbins(rnorm(1000), "Scott")
find_nbins(rnorm(1000), "sqrt")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.