edit: Override environment via shim

clone_dot_edit_envR Documentation

Override environment via shim

Description

Override environment via shim

Usage

clone_dot_edit_env(dot, ..., to_replace = list(...))

clone_step_edit(step, ..., to_replace = list(...))

clone_design_edit(design, ..., to_replace = list(...))

Examples

## Not run: 
here_i_am <- "foo"
dot <- quo(here_i_am)
dot2 <- clone_dot_edit_env(dot, here_i_am = "some_message", xyxyx = "bar")
eval_tidy(dot)
eval_tidy(dot2)

## End(Not run)
## Not run: 
N <- 50

pop50 <- declare_model(N=N, noise=rnorm(N))
nrow(pop50())

pop100 <- DeclareDesign:::clone_step_edit(pop50, N=100)
nrow(pop100())
nrow(pop50())


## End(Not run)
N <- 50

## Not run: 

my_design <- declare_model(N=N, noise=rnorm(N)) + NULL
my_design2 <- DeclareDesign:::clone_design_edit(my_design, N=100)

nrow(draw_data(my_design))
nrow(draw_data(my_design2))


## End(Not run)

DeclareDesign documentation built on June 21, 2022, 1:05 a.m.