I am working on a dataset, where I am doing feature engineering
dataset $ variable1 [dataset $ variable2 == "A"] = "B"
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
Where am I going wrong?