simulate_rcrds {edibble} | R Documentation |
Simulate records
Description
Simulate records
Usage
simulate_rcrds(.data, ..., .seed = NULL, .nsim = 1L)
Arguments
.data |
An edibble data |
... |
A name-value pair where the name should correspond to the names
used in the |
.seed |
An optional seed value. |
.nsim |
The number of times to simulate data. |
Examples
design() %>%
set_units(unit = 4) %>%
set_trts(trt = 2) %>%
allot_table(trt ~ unit) %>%
set_rcrds(y = unit) %>%
simulate_process(y = function() {
res <- rnorm(n())
res
}) %>%
simulate_rcrds(y = with_params(), .nsim = 3)
[Package edibble version 1.1.1 Index]