Get or set data in the component's env_extra and env
environments. If name is NULL, the entire environment is returned.
Usage
bru_comp_env_extra(x, name = NULL)
bru_comp_env_extra(x, name) <- value
bru_comp_env(x, name = NULL)
bru_comp_env(x, name) <- valueValue
For the getter, either the entire environment or the
value of name in the environment. For the setters, the modified
bru_comp object.
Functions
bru_comp_env_extra(x, name) <- value: Set data in the component'senv_extraenvironmentbru_comp_env(): Get the component'senvenvironment, or an element from that environment. Note that in most cases this environment is the global R environment.bru_comp_env(x, name) <- value: Set data in the component'senvenvironment. Note that in most cases this environment is the global R environment, so modifying it is normally not recommended.
Examples
if (bru_safe_inla()) {
cmp <- bru_comp("x", x)
as.list(bru_comp_env_extra(cmp))
cmp <- bru_comp("x", x, model = "fixed")
as.list(bru_comp_env_extra(cmp))
bru_comp_env(cmp)
}
#> <environment: 0x55ac854949c0>