Suppose I have a dataframe, "Election2000" with a column factor "presvote". Presvote has 3 possible values: "republican", "democrat", "NA".
How do I create a new variable, RVote, that converts all republican values to the value 1, and democrat values to 0?