The recommended way of constructing formulas programmatically is to use Terms (or the term function) like so:
[lm(Term(i) ~ Term(:X1) + Term(:X2), data) for i in list]
this is discussed in the docs here.
The recommended way of constructing formulas programmatically is to use Terms (or the term function) like so:
[lm(Term(i) ~ Term(:X1) + Term(:X2), data) for i in list]
this is discussed in the docs here.