I am working on a data set where I have to generate formula to be passed to lm dynamically. So, I am using reformulate to do this.
formula = reformulate(termlabels = c('feature1', 'feature2', 'feature3'), response="y")
y is continuous.
This gets me the formula as y ~ feature1+feature2+feature3
However I want the formula to be log(y+1) ~ feature1+feature2+feature3
How do I do this using reformulate?