Does it help to use . to refer to "all other columns", so your formula can be
res ~ .
For example
df<-data.frame(y = sample(0:1, 50, replace = TRUE),
x1 = rnorm(50),
x2 = runif(50, 0, 20),
x3 = sample(0:1, 50, replace = TRUE))
glm(y ~ ., data = df, family = binomial(link = "logit"))```
Call: glm(formula = y ~ ., family = binomial(link = "logit"), data = df)
Coefficients:
(Intercept) x1 x2 x3
0.167237 -0.043378 0.009484 -0.966465
Degrees of Freedom: 49 Total (i.e. Null); 46 Residual
Null Deviance: 68.59
Residual Deviance: 65.81 AIC: 73.81