If I understand correctly, something like this loop for constructing formulae by permuting a list of variables into a response variable and predictor equations might be helpful to you:
all_variables <- c("x1", "x2", "x3", "x4", "x5")
for (i in 1:length(all_variables)){
combo <- all_variables[-i]
formula <- as.formula(paste(all_variables[i], "~", paste(combo, collapse = " + ")))
#
# use "formula" here
# e.g.
# print(formula)
#
}
Hope this helps. Best regards,