title: Using R to recode data into the existing column
body: <p>I have a column called, <code>CONDITIONALAPPROVAL</code> and it's filled with a lot of the letter, <code>N</code>.  I'd like to recode all these <code>N</code>s to <code>0</code>.  Below is the code I'm using but when I print the column after only <code>&lt;NA&gt;</code>s are present.</p>
  
  <pre><code>attach(my_data)
  my_data$CONDITIONALAPPROVAL[my_data$CONDITIONALAPPROVAL=='N'] &lt;- 0
  my_data$CONDITIONALAPPROVAL
  </code></pre>
  
  <p>It seems simple but it's not working and when I output that column it's just <code>&lt;NA&gt;</code>s where there should be <code>0</code>s.</p>