powered by
This is an internal function that applies a moving average filter to smooth a histogram. It is not intended for direct use by package users.
smooth_histogram(hist_counts, window_size = 5)
A numeric vector of smoothed histogram counts.
A numeric vector of histogram bin counts.
An integer specifying the smoothing window size (default is 5).
# \donttest{ raw_counts <- hist(rnorm(1000), plot = FALSE)$counts smoothed <- smooth_histogram(raw_counts) plot(smoothed, type = "l", col = "blue") # }
Run the code above in your browser using DataLab