pmx_copy: Creates a deep copy of the controller

Description Usage Arguments Details Value Examples

View source: R/pmxClass.R

Description

Creates a deep copy of the controller

Usage

1
pmx_copy(ctr, keep_globals = FALSE, ...)

Arguments

ctr

pmxClass object

keep_globals

logical if TRUE we keep the global parameters changed by pmx_settings

...

extra parameters passed to pmx_settings

Details

The controller is an 'R6' object, it behaves like a reference object. Some functions ( methods) can have a side effect on the controller and modify it internally. Technically speaking we talk about chaining not piping here. However , using pmx_copy user can work on a copy of the controller.

By default the copy does not keep global parameters set using pmx_settings.

Value

an object of pmxClass

Examples

1
2
3
ctr <- theophylline()
cctr <- ctr %>% pmx_copy()
## Any change in the ctr has no side effect in the ctr and vice versa

ggPMX documentation built on Sept. 20, 2021, 5:09 p.m.