optimal_bins {commecometrics} | R Documentation |
Determine optimal number of bins using Scott's Rule
Description
Calculates the optimal number of bins for a numeric vector based on Scott's rule.
Usage
optimal_bins(x)
Arguments
x |
Numeric vector. |
Value
Integer representing the optimal number of bins.
Examples
# Simple example
# Example with normally distributed data
optimal_bins(rnorm(100))
[Package commecometrics version 1.0.0 Index]