On 23/05/2016 7:26 AM, John Sorkin wrote:

The syntax
mydat <- data.frame( y,x )
fit1 <- lm( y~., data=mydat )
appears to perform a multivariable regression of y on every non-y variable in 
the data frame mydat. I can not find this syntax (y~.) in R documentation. Is 
y~. a supported feature of the R language? Where can I find it documented? I 
would hate to write code that is dependent on a non-supported, non-documented 
language feature.

It is documented in the Introduction to R manual (hidden in section 11.5, "Updating fitted models"), and in ?formula, which ?lm refers to.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to