title: Generate new variable in R by for loop index
body: <p>Hello and thanks in advance.  I have a simple for loop, but the tricky part is that for every i in the counter, I'd like to generate a new variable that's indexed by i:</p>
  
  <pre><code>for (i in c(1,2,3)) {
      var_[i] &lt;- i + 2
  }
  </code></pre>
  
  <p>So the end result I'm trying to get is three variables var_1, var_2, var_3 equal to 3,4 and 5 respectively.</p>