title: How to write to a new column if grep is true in r
body: <p>This is probably simple but I would like to write to a new column if grep matches true in another column. Here is my code</p>
  
  <pre><code>ifelse(grepl("HALO|RFA|APC",Therap$ERPROCEDUREPERFORMED),Therap$RFA_EVENT=="RFA","nothing")
  </code></pre>
  
  <p>At the moment the column does not get written to. How can I make this happen?</p>