title: Accessing a vector inside a vector
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7221746/is-there-a-way-to-access-an-index-within-a-vector">Is there a way to access an index within a vector</a>  </p>
  </blockquote>
  
  
  
  <p>I've posted a similar question recently, however i didn't really receive an answer. 
  I need to access a vector within a list of vectors, this is what the code looks like so far:</p>
  
  <pre><code>MyDataR1 &lt;- scan("D:\\R Code\\Residential\\bvl5 res.txt",what='character') 
  MyDataR2 &lt;- scan("D:\\R Code\\Residential\\bvl5 res.txt",what='character') 
  MyDataR3 &lt;- scan("D:\\R Code\\Residential\\cpk11 res.txt",what='character')
  
  MyDataR &lt;- c(MyDataR1,MyDataR2,MyDataR3)
  print (MyDataR[3])
  </code></pre>
  
  <p>However the print command doesn't actually print the 3rd vector (MyDataR3), it prints out the 3rd value from the 1st vector (MyDataR1)</p>
  
  <p>Is there any way to access the individual vectors within a vector?? And how would i go about accessing the individual value of a vector within a vector? I thought it would look like this:</p>
  
  <pre><code>MyDataR[[3]][5] &lt;- 5    #this would access the 5th value of the 3rd vector and modifies it
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>