R/median.R

Defines functions median.dst

Documented in median.dst

#' @importFrom stats median
#'
#' @param x Distribution to calculate median from.
#' @details
#' Median is calculated as the 0.5-quantile. So, when the median is
#' non-unique, we take the smallest of the possibilities.
#' @rdname moments
#' @export
median.dst <- function(x, ...) {
  eval_quantile(x, at = 0.5)
}
vincenzocoia/distionary documentation built on March 5, 2024, 3:13 a.m.