Basically I need to fill in missing data in a column.
Let's say, for instance, I am having the below data frame and in that each employee particularly works in 1 of the locations and does not work in more than one. So in the below illustration since the non-missing values for Bill show East, then Bill works in the East location. My question is how do I substitute all the NAs for Bill to the correct region. And how can I do that for each of the other employees as well?
Name Region
1 Bill East
2 Bill East
2 Bill NA
4 Bill NA
5 Karen NA
6 Karen South
7 Karen NA
8 Richard NA
9 Richard West
10 Richard NA
11 Richard West