case/variable.names {base} | R Documentation |
Case and Variable Names of Fitted Models
Description
Simple utilities returning (non-missing) case names, and (non-eliminated) variable names.
Usage
case.names(object, ...)
case.names.lm(object, full = FALSE, ...)
variable.names(object, ...)
variable.names.lm(object, full = FALSE, ...)
Arguments
object |
an R object, typically a fitted model. |
full |
logical; if |
... |
further arguments passed to or from other methods. |
Value
A character vector.
See Also
lm
Examples
x <- 1:20
y <- x + (x/4 - 2)^3 + rnorm(20, s=3)
names(y) <- paste("O",x,sep=".")
ww <- rep(1,20); ww[13] <- 0
summary(lmxy <- lm(y ~ x + I(x^2)+I(x^3) + I((x-10)^2),
weights = ww), cor = TRUE)
variable.names(lmxy)
variable.names(lmxy, full= TRUE)# includes the last
case.names(lmxy)
case.names(lmxy, full = TRUE)# includes the 0-weight case