title: Why is it possible to use `$` to subset SpatialPolygonsDataFrame?
body: <p>When I have a SpatialPolygonsDataFrame object, I know that I can get to the data two ways:</p>
  
  <pre><code>spatial_df@data$column
  spatial_df$column
  </code></pre>
  
  <p>However I don't understand why the second way is possible. I thought that I must access the <code>data</code> slot using <code>@</code>? Is this something unique about the <code>SpatialPolygonsDataFrame</code> class, or is it something about S4 object in general?</p>
  
  <p>One possible answer is in the <a href="http://cran.r-project.org/web/packages/sp/sp.pdf" rel="nofollow"><code>sp</code> documentations</a>, which mentions the method <code>[</code> for the <code>SpatialPolygonsDataFrame</code> class. However, since <code>$</code> is equivalent to <code>[[</code>, NOT to <code>[</code>, I'm not sure that's the answer.</p>