R/dst_exp.R

Defines functions dst_exp

Documented in dst_exp

#' Exponential Distribution
#'
#' Makes a distribution belonging to the family of
#' exponential distributions.
#'
#' @param rate Rate.
#'
#' @examples
#' dst_exp(1)
#'
#' @export
dst_exp <- function(rate) {
  if (rate <= 0) {
    stop('rate must be greater than 0.')
  }
  dst_parametric(
    "exp", rate = rate, .variable = "continuous", .env = "package:stats"
  )
}
vincenzocoia/distionary documentation built on March 5, 2024, 3:13 a.m.