\HeaderA{getGroups.corStruct}{Extract corStruct Groups}{getGroups.corStruct}
\keyword{models}{getGroups.corStruct}
\begin{Description}\relax
This method function extracts the grouping factor associated with
\code{object}, if any is present.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'corStruct':
getGroups(object, form, level, data, sep)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an object inheriting from class \code{corStruct}
representing a correlation structure.
\item[\code{form}] this argument is included to make the method function
compatible with the generic. It will be assigned the value of
\code{formula(object)} and should not be modified.
\item[\code{level}] this argument is included to make the method function
compatible with the generic and is not used.
\item[\code{data}] an optional data frame in which to evaluate the variables
defined in \code{form}, in case \code{object} is not initialized and
the grouping factor needs to be evaluated.
\item[\code{sep}] character, the separator to use between group levels when
multiple levels are collapsed.  The default is \code{'/'}.
\end{ldescription}
\end{Arguments}
\begin{Value}
if a grouping factor is present in the correlation structure
represented by \code{object}, the function returns the corresponding
factor vector; else the function returns \code{NULL}.
\end{Value}
\begin{Author}\relax
Jose Pinheiro \email{Jose.Pinheiro@pharma.novartis.com} and Douglas Bates \email{bates@stat.wisc.edu}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{getGroups}{getGroups}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
cs1 <- corAR1(form = ~ 1 | Subject)
getGroups(cs1, data = Orthodont)
\end{ExampleCode}
\end{Examples}

