Create an lm model just specifying columns, generating a formula for you.
lmWrapper(train_matrix, criterion_col, cols_to_fit, include_intercept = TRUE)
A matrix (or data.frame) of data to train (fit) the model with.
The index of the criterion column-- "y" in the formula.
A vector of column indexes to fit-- the "x's" in the formula.
A boolean of whether to include an intercept in the formula.
An object of class lm.