Have a CSV file with wages.
Attempting to convert a qualitative variable into a numerical variable. The variable is "marital", where 1 denotes being married and 0 denotes being unmarried.
wages = read.csv("Desktop/wages.csv")
wages$marital1=as.numeric(wages$marital1=="married")
Keep getting
Error in `$<-.data.frame`(`*tmp*`, marital1, value = numeric(0)) :
replacement has 0 rows, data has 526