a function to generate truncated distribution. Simulate one random sample from a standard normal distribution truncated to the left in the middle .rtrunc(1, spec = "norm", a = -Inf, b = 0)
.rtrunc(n, spec, a = -Inf, b = Inf, ...)
the number of observations.
a character string to specify the distribution.
lower bound.
upper bound.
any other arguments that can be used for the functions of different distribution such as "mean", "sd" for "qnorm()".
A vector contains n random samples from the truncated distribution "spec".