# NOT RUN {
n <- 10
tgrid <- c(0, 1, 3, 7, Inf)
rates <- c(0.5, 4, 0.8, 0.1)
x <- sort(rpexp(n, tgrid=tgrid, rates=rates))
Fx <- ppexp(x, tgrid, rates)
y <- qpexp(Fx, tgrid, rates)
# checking:
x==y
# }
Run the code above in your browser using DataLab