r_insert {wakefield} | R Documentation |
Insert Data Frames Into r_data_frame
Description
Safely insert data.frame
objects into a
r_data_frame
or r_list
.
Usage
r_insert(x, name = "Inserted")
Arguments
x |
A |
name |
A name to assign to |
Value
Returns a data.frame
with a
attributes(x)[["seriesname"]]
assigned.
See Also
Examples
dat <- dplyr::data_frame(
Age_1 = age(100), Age_2 = age(100), Age_3 = age(100),
Smokes = smokes(n=100),
Sick = ifelse(Smokes, sample(5:10, 100, TRUE), sample(0:4, 100, TRUE)),
Death = ifelse(Smokes, sample(0:1, 100, TRUE, prob = c(.2, .8)),
sample(0:1, 100, TRUE, prob = c(.7, .3)))
)
r_data_frame(100,
id,
r_insert(dat)
)
r_list(10,
id,
r_insert(dat)
)
[Package wakefield version 0.3.6 Index]