% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/used.R
\name{bru_used}
\alias{bru_used}
\alias{bru_used.NULL}
\alias{bru_used.default}
\alias{bru_used.bru}
\alias{bru_used.bru_info}
\alias{bru_used.list}
\alias{bru_used.bru_obs}
\alias{bru_used.bru_pred_expr}
\alias{bru_used.bru_used}
\alias{format.bru_used}
\alias{summary.bru_used}
\alias{print.bru_used}
\title{List components used in a model}
\usage{
bru_used(x = NULL, ...)

\method{bru_used}{`NULL`}(x = NULL, ...)

\method{bru_used}{default}(x, ...)

\method{bru_used}{bru}(x, ..., join = TRUE)

\method{bru_used}{bru_info}(x, ..., join = TRUE)

\method{bru_used}{list}(x, ..., join = TRUE)

\method{bru_used}{bru_obs}(x, ...)

\method{bru_used}{bru_pred_expr}(x, ...)

\method{bru_used}{bru_used}(x, labels = NULL, ...)

\method{format}{bru_used}(x, ...)

\method{summary}{bru_used}(object, ...)

\method{print}{bru_used}(x, ...)
}
\arguments{
\item{x}{An object that contains information about used components}

\item{\dots}{Parameters passed on to the other methods}

\item{join}{Whether to join list output into a single object; Default
may depend on the input object class}

\item{labels}{character; component labels passed on to
\code{\link[=bru_used_update]{bru_used_update()}}}
}
\value{
A \code{bru_used} object (a list with elements \code{effect}
and \code{latent}), or a list of such objects
(for methods with \code{join = FALSE})
}
\description{
Create or extract information about which components are used by a model, or
its individual observation models. If a non-NULL \code{labels} argument is
supplied, also calls \code{\link[=bru_used_update]{bru_used_update()}} on the \code{bru_used} objects.
}
\section{Methods (by class)}{
\itemize{
\item \code{bru_used(`NULL`)}: Create a \code{bru_used} object by calling \code{\link[=new_bru_used]{new_bru_used()}}.

\item \code{bru_used(default)}: Create a \code{bru_used} object by calling \code{\link[=new_bru_used]{new_bru_used()}}

\item \code{bru_used(bru)}: Extract the \code{bru_used} information for the collection
of observation models used in a \code{bru} object.

\item \code{bru_used(bru_info)}: Extract the \code{bru_used} information for the collection
of observation models used in a \code{bru_info} object.

\item \code{bru_used(list)}: Extract the \code{bru_used} information for each element
of a list, and optionally join into a single \code{bru_used} object.

\item \code{bru_used(bru_obs)}: Extract the \code{bru_used} information for the observation
model predictor used in a \code{bru} observation model \code{bru_obs} object.

\item \code{bru_used(bru_pred_expr)}: Extract the \code{bru_used} information for an observation
model predictor \code{bru_pred_expr} object.

\item \code{bru_used(bru_used)}: Convenience method that takes
an existing \code{bru_used} object and calls \code{\link[=bru_used_update]{bru_used_update()}}
if \code{labels} is non-NULL.

}}
\section{Methods (by generic)}{
\itemize{
\item \code{format(bru_used)}: Text formatting method for \code{bru_used} objects.

\item \code{summary(bru_used)}: Summary method for \code{bru_used} objects.

\item \code{print(bru_used)}: Print method for \code{bru_used} objects.

}}
\examples{
(used <- new_bru_used(~.))
bru_used(used, labels = c("a", "c"))
(used <- new_bru_used(~ a + b + c_latent + d_latent))
bru_used(used, labels = c("a", "c"))
(used <- new_bru_used(expression(a + b + c_latent + d_latent)))
bru_used(used, labels = c("a", "c"))

}
\seealso{
Other bru_used: 
\code{\link{bru_used_update}()},
\code{\link{bru_used_vars}()},
\code{\link{new_bru_used}()}
}
\concept{bru_used}
\keyword{internal}
