title: Group columns in a dataframe and subset using a condition
body: <p>I have a dataframe like this </p>
  
  <pre><code>ID &lt;- c("ID001","ID001","ID001","ID001","ID001","ID001","ID001",
          "ID002","ID002","ID002","ID002","ID002")
  Type &lt;- c("A","A","A","A","A","A","A",
            "B","B","B","B","B")
  Measurement &lt;- c("Length","Summary","Breadth","Length","Summary","Breadth","Summary",
                   "Length","Summary","Breadth","Breadth","Summary")
  PassFail &lt;- c("PASS","PASS","PASS","FAIL_PTS","FAIL","FAIL_AVG_HI","FAIL",
                "PASS","FAIL_PTS","FAIL","FAIL_AVG_LOW","FAIL")
  ToolID &lt;- c("SWP","SWP","SWP","ISP","ISP","IKS","IKS",
              "PSX","PSX","PSX","PZY","PZY")
  
  df &lt;- data.frame(ID,Type,Measurement,PassFail,ToolID)
  df
  
        ID Type Measurement     PassFail ToolID
     ID001    A      Length         PASS    SWP
     ID001    A     Summary         PASS    SWP
     ID001    A     Breadth         PASS    SWP
     ID001    A      Length     FAIL_PTS    ISP
     ID001    A     Summary         FAIL    ISP
     ID001    A     Breadth  FAIL_AVG_HI    IKS
     ID001    A     Summary         FAIL    IKS
     ID002    B      Length         PASS    PSX
     ID002    B     Summary     FAIL_PTS    PSX
     ID002    B     Breadth         FAIL    PSX
     ID002    B     Breadth FAIL_AVG_LOW    PZY
     ID002    B     Summary         FAIL    PZY
  </code></pre>
  
  <p>I am trying to subset this data frame using a condition like this: When the  passfail = 'FAIL_AVG_HI' or 'FAIL_AVG_LOW', I would like to remove the rows in that group (ID,Type,ToolID). </p>
  
  <p>My <strong>desired output</strong> would look like this </p>
  
  <pre><code>     ID Type Measurement PassFail ToolID
    ID001    A      Length     PASS    SWP
    ID001    A     Summary     PASS    SWP
    ID001    A     Breadth     PASS    SWP
    ID001    A      Length FAIL_PTS    ISP
    ID001    A     Summary     FAIL    ISP
    ID002    B      Length     PASS    PSX
    ID002    B     Summary FAIL_PTS    PSX
    ID002    B     Breadth     FAIL    PSX
  </code></pre>
  
  <p>I am messing it up with the grouping to remove the rows. I can delete the row that has the above passfail values but how to group them and delete any rows that belong to the group? </p>
  
  <p>I am doing it this way to remove 1 row </p>
  
  <pre><code>df &lt;- subset(df,df$PassFail != 'FAIL_AVG_HI' | df$PassFail != 'FAIL_AVG_LOW')
  </code></pre>