title: matching keywords to a series of text comments
body: <p>I have two sets of information:</p>
  
  <ol>
  <li><p>A csv file where every row has a comment, e.g:</p>
  
  <p>a. I love football
    b. Rugby is a tough game
    c. Hello World</p></li>
  <li><p>Another csv file that list words related to sports, e.g:</p>
  
  <p>a. tennis
    b. football
    c. rugby</p></li>
  </ol>
  
  <p>What I want to do is: 
    a. find whether any of the words in the second file appears at least once in every individual rows of the first file.
    b. If it appears at least once, it should be categorize as sports against every comment, else others.</p>
  
  <p>The output file should look like:</p>
  
  <pre><code>Comments                          category
    a. I love football               sports
    b. Rugby is a tough game         sports
    c. Hello World                   others
  </code></pre>
  
  <p>I want to do this exercise in R. I explored str_detect &amp; grepl function in R but not achieving the desire output.</p>
  
  <p>Your help is appreciated.</p>
  
  <p>Thanks</p>