title: subset data frame based on character value
body: <p>I'm trying to subset a data frame that I imported with read.table using the <code>colClasses='character'</code> option.</p>
  
  <p>A small sample of the data can be <a href="https://slapadabias.wordpress.com/?p=2&amp;preview=true&amp;preview_id=2" rel="nofollow">found here</a> </p>
  
  <pre><code>Full99&lt;-read.csv("File.csv",header=TRUE,colClasses='character')
  </code></pre>
  
  <p>After removing duplicates, missing values, and all unnecessary columns I get a data frame of these dimmensions:</p>
  
  <pre><code>&gt;dim(NoMissNoDup99)
  [1] 81551     6
  </code></pre>
  
  <p>I'm interested in reducing the data to only include observations of a specific <code>Service.Type</code></p>
  
  <p>I've tried with the subset function:</p>
  
  <pre><code>MU99&lt;-subset(NoMissNoDup99,Service.Type=='Apartment'|
   Service.Type=='Duplex'|
   Service.Type=='Triplex'|
   Service.Type=='Fourplex',
   select=Service.Type:X.13)
  
   dim(MU99)
  [1] 0 6
  
  MU99&lt;-NoMissNoDup99[which(NoMissNoDup99$Service.Type!='Hospital' 
                  &amp; NoMissNoDup99$Service.Type!= 'Hotel or Motel'
                  &amp; NoMissNoDup99$Service.Type!= 'Industry'
                  &amp; NoMissNoDup99$Service.Type!= 'Micellaneous'
                  &amp; NoMissNoDup99$Service.Type!= 'Parks &amp; Municipals'
                  &amp; NoMissNoDup99$Service.Type!= 'Restaurant'
                  &amp; NoMissNoDup99$Service.Type!= 'School or Church or Charity'
                  &amp; NoMissNoDup99$Service.Type!='Single Residence'),]
  </code></pre>
  
  <p>but that doesn't remove observations.</p>
  
  <p>I've tried that same method but slightly tweaked...</p>
  
  <pre><code>MU99&lt;-NoMissNoDup99[which(NoMissNoDup99$Service.Type=='Apartment'
                  |NoMissNoDup99$Service.Type=='Duplex'
                  |NoMissNoDup99$Service.Type=='Triplex'
                  |NoMissNoDup99$Service.Type=='Fourplex'), ]
  </code></pre>
  
  <p>but that removes every observation...</p>
  
  <p>The final subset should have somewhere around 8000 observations</p>
  
  <p>I'm pretty new to R and Stack Overflow, so I apologize if there's some convention of posting I've neglected to follow, but if anyone has a magic bullet to get this data to cooperate, I'd love your insights :)</p>