title: Replace values by a character in a dataset column
body: <p>I would like to replace the 1-values in a dataset column by a character. I tried with</p>
  
  <pre><code>dataset$out[dataset$out==1]&lt;-'A'
  </code></pre>
  
  <p>but I obtain the warning message:</p>
  
  <pre><code>Warning message: In `[&lt;-.factor`(`*tmp*`, dataset$out == 1, value = c(1L, 1L,  :
  invalid factor level, NA generated
  </code></pre>
  
  <p>What I did wrong?</p>