title: Matching documents to keywords
body: <p>I have a data set that looks like the following:</p>
  
  <p>This is a maintenance log and the text describes the work done and the rest of the columns are components. Each entry is a separate maintenance item and this is a data frame.</p>
  
  <pre><code>Text                                       Engine Coolant Brakes Battery
  Engine Oil changed and battery replaced.    0      0       0      0
  Coolant changed.                             0      0       0     0 
  </code></pre>
  
  <p>I am looking to transform it such that I get a data frame like the one below:</p>
  
  <pre><code>Text                                       Engine Coolant Brakes Battery
  Engine Oil changed and battery replaced.    1       0       0      1
  Coolant changed.                             0      1       0     0 
  </code></pre>
  
  <p>So basically I am looking to match the parts serviced and note them for each maintenance item.
  I tried an ifelse() on it, but was not successful.
  I only got a long string of zeroes.
  Thanks for your input.</p>