Description Usage Arguments Value See Also Examples
Safely insert data.frame
objects into a
r_data_frame
or r_list
.
1 |
x |
A |
name |
A name to assign to |
Returns a data.frame
with a
attributes(x)[["seriesname"]]
assigned.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.