title: Check whether string is contained within a list
body: <p>I'm trying to find a way to check whether a list <strong>contains an element that itself contains a particular string</strong>. Finding an exact match is simple with <code>%in%</code>:</p>
  
  <pre><code>list1 &lt;- list("a","b","c")
  "a" %in% list1
  [1] TRUE
  </code></pre>
  
  <p>But it only works if the element is identical, i.e. it doesn't return TRUE if the element only contains the string:</p>
  
  <pre><code>list2 &lt;- list("a,b","c,d")
  "a" %in% list2
  [2] FALSE
  </code></pre>
  
  <p>Is there a way to generate TRUE for the second example? Thanks in advance.</p>