title: Lists inside list, how to access elements?
body: <p>I have a function that needs to return two two different types of groups of vectors. I could do this using a list consisting of two matrices, where the vectors, that I want to return, correspond to columns in the matrix, but since the vectors all have different lengths, I would like to save the vectors in a list themselves, so that I have a list consisting of two lists.</p>
  
  <p>I would like to add the vectors to the sublists now, but don't know which indices to use. </p>
  
  <p>For example if I would like to add the vector x to the first sublist in my list(call it l), how would I do that?</p>
  
  <pre><code>l[[1]] &lt;- x
  </code></pre>
  
  <p>would only replace the first vector in the first sublist, but how could I access the second element in the sublist using indices?</p>