R/rvngamma.R

#' @export
rvngamma <- function (n=1, shape, rate = 1, scale = 1/rate) {
  if (any(shape < 0, na.rm=TRUE)) {
    stop("shape parameter must be nonnegative")
  }
  shape <- (1/3 + shape)
  rvvapply(rgamma, n.=n, shape=shape, scale=scale)
}

Try the rv package in your browser

Any scripts or data that you put into this service are public.

rv documentation built on March 18, 2022, 5:55 p.m.