redf: Random numbers from empirical distribution function.
Description
Random numbers drawn from an empirical distribution defined by paired values and probabilities.
Usage
redf(n, fit)
Arguments
n
Integer number of random numbers to return.
fit
Data frame defining the emprical distribution (see details).
Value
A numeric vector.
Details
The distribution function is defined by fit, which must be a dataframe containing (at least) columns named:
x: a regular sequence of values from which to draw;
y: corresponding pdf values.