| parameter_grid | R Documentation |
Generate parameter combinations
parameter_grid(
...,
n = 10L,
method = c("grid", "random", "latin_hypercube"),
seed = NULL
)
... |
Named vectors, one per parameter. Under |
n |
Single positive whole number of rows to draw for the |
method |
One of |
seed |
Optional single random seed. It is applied for the sampling methods only and is restored on exit. |
A base data.frame with one row per parameter combination, a
leading scenario_id column numbering the rows, and then one column per
parameter in the order given.
# Full factorial grid over named parameters.
parameter_grid(sample_size = c(50, 100), effect = c(0.2, 0.5))
# Latin-hypercube sample of `n` draws over two ranges. Grid parameters are
# passed through `...`, so none of them may be called `n`, `method` or `seed`.
parameter_grid(
sample_size = c(50, 200), effect = c(0, 1),
n = 5, method = "latin_hypercube", seed = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.