% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pred_expr.R
\name{bru_pred_expr}
\alias{bru_pred_expr}
\alias{new_bru_pred_expr}
\alias{bru_pred_expr.bru_obs}
\alias{bru_pred_expr.bru_obs_list}
\alias{bru_pred_expr.bru_info}
\alias{bru_pred_expr.bru}
\alias{bru_pred_expr.bru_pred_expr}
\alias{format.bru_pred_expr}
\alias{print.bru_pred_expr}
\title{Predictor expression handler object}
\usage{
new_bru_pred_expr(
  x,
  ...,
  used = NULL,
  is_rowwise = NULL,
  .envir = parent.frame()
)

bru_pred_expr(x, ...)

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

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

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

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

\method{bru_pred_expr}{bru_pred_expr}(x, ..., format = "object")

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

\method{print}{bru_pred_expr}(x, ...)
}
\arguments{
\item{x}{For creation, a formula or character string giving the predictor
expression. If the character string is \code{"."}, it is taken to mean an
additive expression including all latent variables. For access, an object
containing a \code{bru_pred_expr} object.}

\item{\dots}{Passed on to submethods}

\item{used}{An optional \code{bru_used} object, overriding the automated
detection. Default: \code{NULL}}

\item{is_rowwise}{logical; whether the predictor can be assumed to use the
input data rowwise, so that blockwise evaluation is possible. If \code{NULL}, it
needs to be set before use. Default: \code{NULL}}

\item{.envir}{The environment in which to evaluate the expression.}

\item{format}{Character; one of
\itemize{
\item \code{"object"} (the default),
\item \code{"text"} (plain text),
\item \code{"quo"} (an \code{rlang} quosure),
\item \code{"expr"} (an \code{rlang} expression),
\item \code{"formula"} (the original formula input if available, otherwise
constructed from the expression),
\item \code{"formula_text"} (a text version of the "formula"),
\item \code{"text_raw"} (plain text, without substituting \code{BRU_EXPRESSION}), or
\item \code{"resp_text"} (plain text of the response side of the formula).
}}
}
\description{
Create and access predictor expression information, keeping track of what
latent variables are used, whether the predictor is additive/linear/rowwise.
}
\section{Methods (by class)}{
\itemize{
\item \code{bru_pred_expr(bru_obs)}: Accessor for the \code{bru_pred_expr} object stored
inside a \code{bru_obs} object.

\item \code{bru_pred_expr(bru_obs_list)}: Accessor for the \code{bru_pred_expr} objects stored
inside a \code{bru_obs_list} object.

\item \code{bru_pred_expr(bru_info)}: Accessor for the \code{bru_pred_expr} object stored
inside a \code{bru_info} object.

\item \code{bru_pred_expr(bru)}: Accessor for the \code{bru_pred_expr} object stored
inside a \code{bru} object.

\item \code{bru_pred_expr(bru_pred_expr)}: Access a \code{bru_pred_expr} object or convert it to
text or expression object.

}}
\section{Functions}{
\itemize{
\item \code{new_bru_pred_expr()}: Create a \code{bru_pred_expr} object from a formula or
character string.

\item \code{bru_pred_expr()}: Accessor generic for \code{bru_pred_expr} objects,
including ones stored inside other objects.

}}
\examples{
(new_bru_pred_expr(~ x + z + Intercept))

}
\keyword{internal}
