Description Usage Arguments Value Examples
Repeat a dataframe-generating operation and collect results in a dataframe.
1 | replicate_df(num_replications, df_generator, ...)
|
num_replications |
natural number |
df_generator |
function that generates a tibble |
... |
additional parameters for df_generator |
a tibble of all rows of each generated tibble, with the replication
index labeled by a new variable, replication
.
1 2 | replicate_df(3, function(n) {head(iris, n)}, 1)
replicate_df(3, function() { rank_outcomes(generate_probabilities(2)) })
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.