Try this:
g <- glm(demand ~ Time, BOD, family = gaussian)
all.vars(formula(g))
The result will be a character vector whose 1st component is
the name of the response and whose subsequent components
are the names of the predictor variables.
On Sun, Jul 26, 2009 at 3:14 PM, Jacob Wegelin wrote:
> S
Suppose we have some glm object such as:
myglm <- glm( y ~ x, data=DAT)
Is there an elegant way--or the "right way" within the R way of thinking--to
obtain the names of the response variable, the predictor variables, and the
dataset, as character strings?
For instance, suppose the "right way" wa
2 matches
Mail list logo