I am using the following to convert "yes", "no" responses into numeric data so that I may plot the results into a scatter plot.
> head(cust.df$email)
[1] "yes" "yes" "yes" "yes" "no" "yes"
> as.numeric(head(cust.df$email))
[1] NA NA NA NA NA NA
Warning message:
NAs introduced by coercion
As you can see, I get this warning message. The end result is that when I create the scatter plot, it is empty because of the NAs.
I have even tried to fix it with this method.
as.factor(head(cust.df$email))
yes yes yes yes no yes
Levels: no yes
> as.numeric(head(cust.df$email))
[1] NA NA NA NA NA NA
Warning message:
NAs introduced by coercion
However, none of that has worked. Does anyone have any tips on how to solve this? The data does have 341 NAs.