title: Repeating elements in a vector with a for loop
body: <p>I want to make a vector from 3:50 in R, looking like </p>
  
  <blockquote>
    <p>3 4 4 5 6 6 7 8 8 .. 50 50 </p>
  </blockquote>
  
  <p>I want to use a for loop in a for loop but it's not doing wat I want.</p>
  
  <pre><code>f &lt;- c()
  for (i in 3:50) {
    for(j in 1:2) {
      f = c(f, i)
    }
  }
  </code></pre>
  
  <p>What is wrong with it?</p>