fill_out easily generates a set of design from a template function. redesign quickly generates a design from an existing one by resetting design variables internally.

fill_out(template, expand = TRUE, ...)

redesign(design, expand = TRUE, ...)

Arguments

template

a function which yields a design.

expand

boolean - if true, form the crossproduct of the ..., otherwise recycle them

...

Options sent to the template.

design

a design

Value

if set of designs is size one, the design, otherwise a `by`-list of designs.

Examples

design_template <- function(N = 100) { population <- declare_population(N = N) return(declare_design(population)) } # returns list of three designs vary_n <- fill_out(design_template, N = seq(30, 100, 10))
# NOT RUN { # diagnose a list of designs created by fill_out or redesign diagnose_vary_n <- diagnose_design(vary_n) # }
# returns a single design large_design <- fill_out(design_template, N = 200)
# NOT RUN { diagnose_large_design <- diagnose_design(large_design) # }
my_population <- declare_population(N = 100) my_design <- declare_design(my_population) # returns a single, modified design design_large_N <- redesign(my_design, N = 1000) # returns a list of five modified designs design_vary_N <- redesign(my_design, N = seq(500, 1000, 100))