R/rpareto2.R

rpareto2 <-
function(n, scale = 1, shape = 1)
{
    if (max(length(scale), length(shape)) > 1) 
        stop("parameters must be of length 1")
    scale*(-1 + runif(n)^(-1/shape))
}

Try the CaDENCE package in your browser

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

CaDENCE documentation built on May 2, 2019, 6:05 a.m.