title: Feature Engineering in R
body: <p>I am working on a dataset, where I am doing feature engineering</p>
  
  <pre><code>dataset $ variable1 [dataset $ variable2 == "A"] = "B"
  </code></pre>
  
  <p>Where I am trying to convert variable1 to B, wherever variable2 is A. But instead of this, my output is showing a warning and it is making all tha values of variable1 as NA (pertaining to variable2 being A), instead of B</p>
  
  <p>Where am I going wrong?</p>