title: How to Store Data in a List - R
body: <p>I hope someone can be of help here.</p>
  
  <p>I'm using R and I've reached a situation where I need to store returned data from a function, the data is in the form a vector. So for example, the function may return: </p>
  
  <pre><code>c(1,2,3,4,5)
  </code></pre>
  
  <p>Suppose I have a list I have already created before: </p>
  
  <pre><code>#I have to store 10 values
  alpha = list(rep(NA, 10))
  </code></pre>
  
  <p>How can I store the returned vector in my list? For example, something along the lines of:</p>
  
  <pre><code>alpha[1] = c(1,2,3,4,5)
  </code></pre>
  
  <p>So then:</p>
  
  <pre><code>alpha = (c(1,2,3,4,5), NA, NA, NA, NA, NA, NA, NA, NA, NA)
  </code></pre>
  
  <p>Any help will be appreciated, thanks.</p>