I have a dataset with information about the education track of some candidates. For instance, I have a column where people with PhD degrees had to include their field (if applicable), or NA if it did not. Like this
Participants PHD_Field
A Economics
B Sciences
C NA
D NA
E NA
I need to create a column and convert their field into 1 and the N/As into 0. Could you please help me with the code to do this in R?