R Code Categorical Variable to 1 and 0
<p>Is there an easy way to convert  2 level categorical variables to binary and then change the column name? So for example: if I had 'gender' variable how would I easily code female as 1, male as 0, and change the column name to isFemale? Thank you in advance. </p>