vec <- c(12, 120) # parameters of exponential distribution
para <- vec2par(vec, "exp") # build exponential distribution parameter
# object
# The following two conditionals are equivalent as are.parexp.valid()
# is called within are.par.valid().
if( are.par.valid(para)) Q <- quaexp(0.5, para)
if(are.parexp.valid(para)) Q <- quaexp(0.5, para)
Run the code above in your browser using DataLab