In addition to using - as in the comments
glm(Stuff ~ . - var1 - var2, data= mydata, family=binomial)
you can also multiply the data frame passed in
glm(Stuff ~ ., data=mydata[ , !(names(mydata) %in% c('var1','var2'))], family=binomial)
or
glm(Stuff ~ ., data=subset(mydata, select=c( -var1, -var2 ) ), family=binomial )
(be careful with this last one, a subset function sometimes doesn't work well inside other functions)
You can also use the paste function to create a line representing the formula with the conditions of interest (a subset of the group of predictors waiting for you), then use as.formula to convert it to the formula.
Greg snow
source share