title: Finding Elements of Lists in R
body: <p>Right now I'm working with a character vector in R, that i use strsplit to separate word by word. I'm wondering if there's a function that I can use to check the whole list, and see if a specific word is in the list, and (if possible) say which elements of the list it is in.</p>
  
  <p>ex.</p>
  
  <pre><code>a = c("a","b","c")
  b= c("b","d","e")
  c = c("a","e","f")
  </code></pre>
  
  <p>If <code>z=list(a,b,c)</code>, then <code>f("a",z)</code> would optimally yield <code>[1] 1 3</code>, and <code>f("b",z)</code> would optimally yield <code>[1] 1 2</code></p>
  
  <p>Any assistance would be wonderful.</p>