title: R: Deleting rows based on a value in a column from a large data set in R
body: <p>I am working in R on data set of 104500 observations. I want to delete rows based on a column name "state" that has values "TX" and "NY".</p>
  
  <p>I am using the following code</p>
  
  <pre><code>customers &lt;- customers[customers$State != "TX"]
  </code></pre>
  
  <p>I'm getting the following error</p>
  
  <blockquote>
    <p>Error: Length of logical index vector must be 1 or 11 (the number of rows), not 104541</p>
  </blockquote>
  
  <p>Can anyone please help me with this?</p>