title: How to subset a shapefile
body: <p>The data set of shapefile "Property1A" is:</p>
  
  <pre><code> df
  #      suburb        area asst
  # 0     Te Aro   14.541780 R076
  # 1     Te Aro    7.655428 R076
  # 2     Te Aro 3189.976134 &lt;NA&gt;
  # 3     Te Aro  242.173386 0132
  # 4     Karori  537.697290 R003
  # 5    Pipitea 1116.954993 R105
  # 6    Mt Cook  106.099900 R151
  # 7     Te Aro   83.307421 R057
  # 8 Aro Valley  544.665788 R105
  # 9 Aro Valley   59.726882 R110
  </code></pre>
  
  <p>When I try to subset the shapefile for suburb "Te Aro", the code I use is:</p>
  
  <pre><code>TeAro &lt;- subset(Property1A, suburb == "Te Aro") 
  </code></pre>
  
  <p>But there is an error:</p>
  
  <pre><code>TeAro &lt;- subset(Property1A, suburb == "Te Aro")
  # Error in eval(expr, envir, enclos) : object 'suburb' not found
  </code></pre>
  
  <p>Why there is an error?</p>