1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{subbars}
\alias{subbars}
\title{"Substitute bars"}
\usage{
subbars(term)
}
\arguments{
\item{term}{a mixed-model formula}
}
\value{
the formula with all | and || operators replaced by +
}
\description{
Substitute the '+' function for the '|' and '||' function in a mixed-model
formula. This provides a formula suitable for the current
model.frame function.
}
\section{Note}{
This function is called recursively on individual
terms in the model, which is why the argument is called \code{term} and not
a name like \code{form}, indicating a formula.
}
\examples{
subbars(Reaction ~ Days + (Days|Subject)) ## => Reaction ~ Days + (Days + Subject)
}
\seealso{
\code{\link{formula}}, \code{\link{model.frame}}, \code{\link{model.matrix}}.
Other utilities:
\code{\link{expandDoubleVerts}()},
\code{\link{mkReTrms}()},
\code{\link{nobars}()}
}
\concept{utilities}
\keyword{models}
\keyword{utilities}
|