title: Selecting rows based on multiple conditions using OR instead of AND in R
body: <p>I have a large dataset that I am trying to filter based on the value of 2 separate columns. For each row I have a column showing their total count (tot) and a column showing the total times that type of sample was seen (tot.type). </p>
  
  <p>I want to filter my data based on both (tot) and (tot.type) where (tot) OR (tot.type) must be greater than or equal to 2, for example.</p>
  
  <p>All examples I have found for filtering based on multiple values use "AND" but nothing where you use "OR"...</p>
  
  <pre><code>Example data:
  name = c("A","B","C","D","E")
  rx = c(1,0,2,1,1)
  ry = c(0,1,1,0,0)
  rz = c(0,0,2,2,3)
  type = c("p","q","r","p","r")
  tot = c(1,1,5,3,4)
  tot.type = c(2,1,2,2,2)
  test = data.frame(name,rx,ry,rz,tot,tot.type)
  </code></pre>
  
  <p>In this example I would discard row B, and keep the rest.</p>
  
  <p>I have filtered the data into 2 separate data sets based on just one column or the other, and then merged them but can this be done in one line that generates one data set, rather than doing two separate ones and combining them later?</p>