title: Subseting Data in R with rownames
body: <p>I'm trying to get subset of my data in R. I tried this, but I got unexpected result!</p>
  
  <pre><code>&gt;str(data)
  num [1:500, 1:2000] 5.65
  &gt;y&lt;-c("rowname1"   , "rowname2", ... )
  &gt; spotA&lt;-data[y]
  
  NULL
  &gt; spotA
   [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  </code></pre>
  
  <p>also I tried as following way :</p>
  
  <pre><code>&gt;spotA&lt;-data[c("rowname1"   , "rowname2", ... )]
  </code></pre>
  
  <p>and I got the above result. what I would expect is to get sotA with dimension 16 2000 with numeric entries, not NA ! can somebody help me where is my mistake ?</p>