title: R finding spatialpolygons within a spatialpolygon
body: <p>I have a US House District polygon which is a simple outline of that house district. This is a <code>SpatialPolygonsDataFrame</code>. </p>
  
  <pre><code>CRS("+proj=longlat +datum=WGS84"))
  </code></pre>
  
  <p>Next, I have a state's (Texas) Census block <code>SpatialPolygonsDataFrame</code>. </p>
  
  <pre><code>CRS("+proj=longlat +datum=WGS84")
  </code></pre>
  
  <p>My goal is to find the Census block groups that fit within that US House District. </p>
  
  <p>My approach seems badly flawed.</p>
  
  <pre><code>mysp &lt;- raster::aggregate(rbind(SUBBLOCK_ALL.shp, CD32.shp))
  </code></pre>
  
  <blockquote>
    <p>Error in as(x, "SpatialPolygons") :    no method or default for
    coercing “NULL” to “SpatialPolygons”</p>
  </blockquote>
  
  <pre><code>mysp &lt;- rgeos::gIntersection(CD32.shp,SUBBLOCK_ALL.shp,byid = TRUE)
  </code></pre>
  
  <blockquote>
    <p>Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_lower_td,
    unaryUnion_if_byid_false,  :    trying to get slot "proj4string" from
    an object of a basic class ("NULL") with no slots</p>
  </blockquote>
  
  <pre><code>mysp &lt;- rgeos::gIntersection(CD32.shp,SUBBLOCK_ALL.shp,byid = TRUE)
  </code></pre>
  
  <blockquote>
    <p>Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_lower_td,
    unaryUnion_if_byid_false,  :    trying to get slot "proj4string" from
    an object of a basic class ("NULL") with no slots</p>
  </blockquote>
  
  <p>My question is what's a better possible approach?</p>