% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/effect.R
\name{bru_comp_env_extra}
\alias{bru_comp_env_extra}
\alias{bru_comp_env_extra<-}
\alias{bru_comp_env}
\alias{bru_comp_env<-}
\title{Get/set component environment data}
\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) <- value
}
\arguments{
\item{x}{A \code{bru_comp} object}

\item{name}{The name of the variable to get or set. Names
prefixed by \code{"BRU_"} are reserved for internal use and should not be set
by users or external package authors.}

\item{value}{The value to set for \code{name} in \code{env_extra} (for the setter
function).}
}
\value{
For the getter, either the entire environment or the
value of \code{name} in the environment. For the setters, the modified
\code{bru_comp} object.
}
\description{
Get or set data in the component's \code{env_extra} and \code{env}
environments. If \code{name} is \code{NULL}, the entire environment is returned.
}
\section{Functions}{
\itemize{
\item \code{bru_comp_env_extra(x, name) <- value}: Set data in the component's \code{env_extra}
environment

\item \code{bru_comp_env()}: Get the component's \code{env} environment, or an
element from that environment.
Note that in most cases this environment is the global R environment.

\item \code{bru_comp_env(x, name) <- value}: Set data in the component's \code{env} environment.
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)
}

}
\seealso{
bru_comp
}
