\Header{latticeParseFormula}{Parse Trellis formula}
\keyword{utilities}{latticeParseFormula}
\begin{Description}\relax
this function is used in trellis functions. Might
be useful by itself. \code{y} and \code{g\_1,...,g\_n} may be missing.\end{Description}
\begin{Usage}
\begin{verbatim}
latticeParseFormula(model, data, dimension = 2)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{model}] the model/formula to be parsed.
This can be in either of two possible forms, one for 2d and one for
3d formulas, determined by the \code{dimension} argument. The 2d
formulas are of the form \code{y\textasciitilde{}x|g\_1*...*g\_n}, and the 3d
formulas are of the form \code{z\textasciitilde{}x*y|g\_1*...*g\_n}. In the first
form, \code{y} may be omitted. The conditioning variables \code{g\_1,
      ...,g\_n} can be omitted in either case.

\item[\code{data}] the environment/dataset where the variables in the 
formula are evaluated. By default, the environment where the
function was called from.

\item[\code{dimension}] dimension of the model, see above
\end{ldescription}
\end{Arguments}
\begin{Value}
returns a list with components \code{left, right, left.name, 
    right.name, condition} for 2d, and \code{left, right.x, right.y,
    left.name, right.x.name, right.y.name, condition} for 3d.\end{Value}
\begin{Author}\relax
Saikat DebRoy \email{saikat@stat.wisc.edu}\end{Author}
\begin{SeeAlso}\relax
\code{\Link{xyplot}}, \code{\Link{Lattice}}\end{SeeAlso}

