##generate some data:
set.seed(123) #for reproducibility
y <- rnorm(30) #generate Y
x <- matrix(rnorm(30*10), 30, 10) #matrix of Xs
colnames(x) <- paste0("var", 1:NCOL(x))
##estimate model:
mymod <- lm(y ~ x)
##do gets modelling:
gets(mymod)
##ensure intercept is not removed:
gets(mymod, keep=1)
Run the code above in your browser using DataLab