title: How do I append to a vector using a `while` loop?
body: <p>I want to make a vector using a loop.</p>
  
  <p>Here's my R code:</p>
  
  <pre><code>vec_teamCodes &lt;- c()
  x &lt;- 0
  while (x &lt; 10) {
    append(vec_teamCodes,"Hello")
    x &lt;- x+1
  }
  </code></pre>
  
  <p>But when I run it, <code>vec_teamCodes()</code> remains <code>NULL</code>.</p>
  
  <p>Why? How do I fix my code?</p>