r_list {wakefield} | R Documentation |
List Production (From Variable Functions)
Description
Produce a named list
that allows the user to lazily pass
unnamed wakefield variable functions (optionally, without call
parenthesis).
Usage
r_list(n, ..., rep.sep = "_")
Arguments
n |
The length to pass to the randomly generated vectors. |
rep.sep |
A separator to use for repeated variable names. For example
if the |
... |
A set of optionally named arguments. Using wakefield variable functions require no name or call parenthesis. |
Value
Returns a named list of equal length vectors.
Author(s)
Josh O'Brien and Tyler Rinker <tyler.rinker@gmail.com>.
References
https://stackoverflow.com/a/29617983/1000343
See Also
r_data_frame
,
r_series
r_dummy
Examples
r_list(
n = 30,
id,
race,
age,
sex,
hour,
iq,
height,
died,
Scoring = rnorm
)
r_list(
n = 30,
id,
race,
age(x = 8:14),
Gender = sex,
Time = hour,
iq,
height(mean=50, sd = 10),
died,
Scoring = rnorm
)