Generate ff vector with draws from distribution
ffrandom(n, rfun = runif, ..., vmode = NULL)
n |
number of observations |
rfun |
a function generating the draws from the random distribution.
This function should expect the number of draws as its first argument.
Valid examples are the routines |
... |
additional arguments are passed on to |
vmode |
the vmode of the resulting vector. See |
Before generating the vector a single draw is taken from the
distribution. This might be important if one tries to reproduce draws
directly from rfun
.
An ff
vector with draws from the distribution.
n <- ffrandom(1E3, rnorm, mean = 10, sd = 5) set.seed(123) runif(1) a <- runif(10) set.seed(123) b <- ffrandom(10, runif) identical(a, b[])
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.