title: R equivalent to the MATLAB structure?
body: <p>Is there an R type equivalent to the Matlab structure type?</p>
  
  <p>I have a few named vectors and I try to store them in a data frame. Ideally, I would simply access one element of an object and it would return the named vectors (like a structure in Matlab). I feel that using a data frame is not the right thing to do since it can store the values of the named vectors but not the names when they differ from one vector to the other.</p>
  
  <p>More generally, is it possible to store a bunch of different objects in a single one in R?</p>
  
  <p><strong>Edit</strong>: As Joran said I think that <code>list</code> does the job.</p>
  
  <pre><code>l = list()
  l$vec1 = namedVector1
  l$vec2 = namedVector2
  ...
  </code></pre>
  
  <p>If I have a  list of names</p>
  
  <pre><code>name1 = 'vec1'
  name2 = 'vec2'
  </code></pre>
  
  <p>is there any way for the interpreter to understand that when I use a variable name like name1, I am not referring to the variable name but to its content? I have tried <code>get(name1)</code> but it does not work.</p>