#' Estimate optimal binwidth for histogram according to Freedman-Diaconis rule
#'
#' @param x numeric vector to be plotted on histogram
#'
#' @return numeric vector
#'
#' @examples
#' x <- rnorm(100)
#' binwFD(x)
#'
#' @export
#'
binwFD <- function(x) {
2 * IQR(x) / length(x)^(1/3)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.