title: Formula with dynamic number of variables
body: <p>Suppose, there is some data.frame <strong>foo_data_frame</strong> and one wants to find regression of the target column <strong>Y</strong> by some others columns. For that purpose usualy some formula and model are used. For example:</p>
  
  <pre><code>linear_model &lt;- lm(Y ~ FACTOR_NAME_1 + FACTOR_NAME_2, foo_data_frame)
  </code></pre>
  
  <p>That does job well if the formula is coded statically. If it is desired to root over several models with the constant number of dependent variables (say, 2) it can be treated like that:</p>
  
  <pre><code>for (i in seq_len(factor_number)) {
    for (j in seq(i + 1, factor_number)) {
      linear_model &lt;- lm(Y ~ F1 + F2, list(Y=foo_data_frame$Y,
                                           F1=foo_data_frame[[i]],
                                           F2=foo_data_frame[[j]]))
      # linear_model further analyzing...
    }
  }
  </code></pre>
  
  <p>My question is how to do the same affect when the number of variables is changing dynamically during program running?</p>
  
  <pre><code>for (number_of_factors in seq_len(5)) {
     # Then root over subsets with #number_of_factors cardinality.
     for (factors_subset in all_subsets_with_fixed_cardinality) {
       # Here I want to fit model with factors from factors_subset.
       linear_model &lt;- lm(Does R provide smth to write here?)
     }
  }
  </code></pre>