2
\title{Utilities for formulas}
4
\alias{getCovariateFormula}
6
\alias{getGroups,data.frame,formula-method}
7
\alias{getGroups,groupedData-method}
8
\alias{getGroups,groupedData,missing-method}
9
\alias{getGroupsFormula}
10
\alias{getGroupsFormula,ANY-method}
12
\alias{getResponseFormula}
16
These generic functions extract sub-formulas or values of components
17
from a formula/data pair.
20
getCovariate(object, form, data)
21
getCovariateFormula(object)
22
getGroups(object, form, level, data, sep, \dots)
23
getGroupsFormula(object, asList, sep)
24
getResponse(object, form)
25
getResponseFormula(object)
27
splitFormula(form, sep)
30
\item{object}{a formula or an object that can provide a formula}
31
\item{form}{an optional formula with a conditioning expression on its
32
right hand side (i.e. an expression involving the \code{|}
33
operator). Defaults to \code{formula(object)}.}
34
\item{level}{a positive integer vector with the level(s) of grouping to
35
be used when multiple nested levels of grouping are present. This
36
argument is optional for most methods of this generic function and
37
defaults to all levels of nesting.}
38
\item{data}{a data frame in which to interpret the variables named in
39
\code{form}. Optional for most methods.}
40
\item{asList}{an optional logical value. If \code{TRUE} the returned
41
value with be a list of formulas; else, if \code{FALSE} the returned
42
value will be a one-sided formula. Defaults to \code{FALSE}.}
43
\item{sep}{character, the separator to use between group levels when
44
multiple levels are collapsed. Defaults to \code{'/'}.}
45
\item{pos}{the integer index of the component of the formula to
46
return. Defaults to \code{2}.}
47
\item{\dots}{Optional arguments that are passed to some methods. None
51
\code{getGroupsFormula} returns a one-sided formula, or a list of
52
one-sided formulas, giving the grouping structure associated with
53
\code{formula(object)}. If no conditioning expression is present in
54
\code{formula(object)} a \code{NULL} value is returned.
58
form = resp ~ cov1 + cov2 | grp1/grp2
59
getResponseFormula(form)
60
getCovariateFormula(form)
61
getGroupsFormula(form)
62
getGroupsFormula(form, asList = TRUE)