title: How can I make all-possible-regressions in R also include exponents and logs of the variables?
body: <p>I primarily work in research and statistics and so am not as familiar with programming. I'm using the OLSRR package for statistical analysis when trying to compare as many model specifications as possible using all-possible-regressions.</p>
  
  <p>I use the code:</p>
  
  <p><code>model &lt;- lm(y ~ ., data = "mydata"
  k &lt;- ols_all_subset(model)
  k</code></p>
  
  <p>So far, which gives me a table with R2, adjusted R2, AIC, SIC etc for each combination of variables <em>as is</em> (linear). For example, if the variables are x1, x2 and x3, it gives me a table with R2, AIC, SIC etc for the specifications with every possible linear-linear specifications: with x1 x2 and x3 as regressors, with x1 and x2, with x1 and x3, with x2 and x3, and each of just x1, just x2, and just x3.</p>
  
  <p>I want to also get all possibles for squares and logs of the variables to look at every possible major specification. So I don't get just those variables but also x1^2, log(x1), log(x3), and so on. How should I modify what I'm doing so I can get all-possibles that include possible exponential and possible logarithmic specifications as well in my output table?</p>
  
  <p>I know I could individually create a new column and generate each x1^2, log(x1) etc individually as a new column, but sometimes I have dozens of variables and tons of data so doing every single variable individually each time for each new dataset is a pain.</p>