title: R: Extracting string if it is an element of a list
body: <p>I want to dummy-code whether some string is contained in another (which is structured). For example:</p>
  
  <pre><code>player &lt;- c("Michael Jordan", "Steve Kerr", "Michael Jordan", "Toni Kukoc")
  
  bulls &lt;- c("Jordan, Michael Jeffrey", "Pippen, Scottie; Harper, Ron",
             "Rodman, Dennis", "Kerr, Steve; Longley, Luc; Kukoc, Toni")
  </code></pre>
  
  <p>and create a new variable (say, <code>included</code>) if words Michael and Jordan are present in <code>bulls[1]</code>, Steve Kerr in <code>bulls[2]</code> etc. The above should produce <code>TRUE FALSE FALSE TRUE</code>. For generality, names and surnames are separated by commas, whereas a semicolon indicates multiple people in a single entry. Given that the object <code>bulls</code> can feature longer versions of a name ("Jeffrey" in this case) but not the other way around, I suspect the solution might require some sort of an is.element check? I want to iterate this over a long list, what is the best approach?</p>
  
  <p>p.s. I tried several <code>stringr</code> verbs, however no luck so far (_view, _extract etc.)</p>