title: R Select rows based on condition in another column
body: <p>How can I select all the rows of those IDs, that have at least one B as Item? </p>
  
  <pre><code>df&lt;-cbind(c(1,1,1,1,1,2,2,2,2,3,3),c("A","A","B","A","A","B","A","A","B","A","A"))
  colnames(df)&lt;-cbind("ID","ITEM")
  df
  </code></pre>