I\'m trying to do a Last Observation Carried Forward operation on some poorly formatted data using dplyr and tidyr. It isn\'t working as I\'d expe
dplyr
tidyr
This is kind of ugly, but it is another option that uses dplyr and works with your sample data
df %>% group_by(id) %>% mutate(email = email[ !is.na(email) ][1])