How to fill in NA values according to a categorial variable in R
I have some NA values in my data that I would like to fill in according to the filename column. In order words, every observation with the same filename should have the same values in the discipline, nativeness, year, and gender columns. structure(list(TA = c("future_perfect", "future_progressive", "future_simple", "past_perfect", "past_perfect_progressive", "past_progressive", "past_simple", "present_perfect", "present_perfect_progressive", "present_progressive", "present_simple",… Read More How to fill in NA values according to a categorial variable in R