k = data.frame(matrix(rnorm(100), ncol=5))
names(k) = LETTERS[1:5]
formula = make.formula("A", LETTERS[2:5])
formula
lm(formula, data=k)
#do a random model
make.formula("A", LETTERS[2:5], random="(1|group)")
Run the code above in your browser using DataLab