title: subsetting from an R object of Gene IDs from GRanges file
body: <p>I have a GRanges file called "P.obj" where I want to extract/subset specific Gene IDs contained in the column "name".  The specific Gene IDs that I want to extract are contained in the R object "plus" where the column name is also called "name"
  I understand how to subset by overlaps and find overlaps, but I cannot work out how to subset by gene name.</p>
  
  <pre><code>&gt; P.obj
  GRangesList of length 4:
  $exons
  GRanges with 604591 ranges and 2 metadata columns:
             seqnames               ranges strand   |     score            name
                &lt;Rle&gt;            &lt;IRanges&gt;  &lt;Rle&gt;   | &lt;integer&gt;     &lt;character&gt;
         [1]     chr1 [66999066, 66999090]      +   |         1 ENST00000237247
         [2]     chr1 [66999929, 67000051]      +   |         2 ENST00000237247
         [3]     chr1 [67091530, 67091593]      +   |         3 ENST00000237247
         [4]     chr1 [67098753, 67098777]      +   |         4 ENST00000237247
         [5]     chr1 [67099763, 67099846]      +   |         5 ENST00000237247
         ...      ...                  ...    ... ...       ...             ...
    [604587]    chr22 [51227323, 51227600]      +   |         4 ENST00000423888
    [604588]    chr22 [51222290, 51222500]      +   |         1 ENST00000480246
    [604589]    chr22 [51223601, 51223721]      +   |         2 ENST00000480246
    [604590]    chr22 [51237083, 51239737]      +   |         3 ENST00000480246
    [604591]    chr22 [51237083, 51237551]      +   |         1 ENST00000427528
  
  ...
  &lt;3 more elements&gt;
  ---
  seqlengths:
    chr1  chr2  chr3  chr4  chr5  chr6 ... chr17 chr18 chr19 chr20 chr21 chr22
      NA    NA    NA    NA    NA    NA ...    NA    NA    NA    NA    NA    NA
  
  &gt; plus
               name
  1 ENST00000237247
  3 ENST00000480246
  5 ENST00000427528
  </code></pre>
  
  <p>I have tried:
  P.obj[P.obj$name==plus$name]</p>
  
  <p>But I get an error message:
  Warning message:
  In is.na(e1) : is.na() applied to non-(list or vector) of type 'NULL'</p>