[Solved] Using R, how to reference variable variables (or variables variable) a la PHP
Consider using get() to obtain environment variables from string values. Additionally, consider the nested lapply() between dataframe and model lists for more organized returned object. Nested for loops would require appending each iteration into growing list unless you just need to output. Below examples use linear models, lm(): model1 <- y ~ x1 model2 <- … Read more