title: Mapping values in R data frame using a dictionary
body: <p>I have a data frame that looks like this</p>
  
  <pre><code> A      B      C
  one    NULL   one
  NULL   one    NULL
  NULL   one    one
  </code></pre>
  
  <p>How to efficiency replace the Null with 0 and the "one" with 1? 
  Please NOTE that I am not asking for how to replace NULL with 0, I am asking how to replace NULL with 0 AND "one" with 1 in an efficient way  </p>