title: Replace multiple strings in a column of a data frame
body: <p>I've been trying to replace multiple strings in a column of a data frame in R using str_replace_all.</p>
  
  <p>Currently I've written up something simple for now (below)</p>
  
  <pre><code>mydata$Final_Result &lt;- str_replace_all(mydata$Final_Result, 'Absent', 'A')
  mydata$Final_Result &lt;- str_replace_all(mydata$Final_Result, 'Present', 'P')
  </code></pre>
  
  <p>I have other strings to replace in the same column. So I am looking for a more elegant way to write this code in a single line.</p>
  
  <p>Would appreciate if anyone could advise on how this can be done.</p>