# random number with summary statistics
rnexp(10, rate_l=2, rate_u=4, stats = TRUE)
# PDF values
x <- c(1, 2, 3) # Values at which to evaluate the PDF
rate_l <- 0.5
rate_u <- 2.0
dnexp(x, rate_l, rate_u)
# CDF values
q <- c(2, 3, 3.5)
rate_l <- 0.5
rate_u <- 2.0
pnexp(q, rate_l, rate_u)
# Quantile values
p <- 0.5 # Probability at which to evaluate the quantile
rate_l <- 0.5
rate_u <- 2.0
qnexp(p, rate_l, rate_u)
# PDF PLOT
plot_npdfexp(rate_l = 1, rate_u = 2, x = c(0, 5))
# CDF PLOT
plot_ncdfexp(rate_l = 1, rate_u = 2, x = c(0, 5))
Run the code above in your browser using DataLab