Ah, I found a much better solution: the function
reformulate(termlabels = colnames(InputTable), response = 'Prediction')
Will create a formula from the strings you provide. Manipulate colnames as you like to dynamically choose which variables are used in the model.