My variable (poor
) is a factor with 2 levels: Poor and Non-Poor.
I need it to be 1 if it's Poor and 0 if it's Non-Poor, so i converted it to numeric (with as.numeric
, and then changed it to factor again, with as.factor
, but the levels now are 1 and 2 instead of 1 and 0.
How do i change it?