group_by() into fill() not working as expected

后端 未结 6 815
盖世英雄少女心
盖世英雄少女心 2020-12-31 11:02

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

6条回答
  •  醉梦人生
    2020-12-31 11:15

    Another option is to use do from dplyr:

    df3 <- df %>% group_by(id) %>% do(fill(.,email))
    

提交回复
热议问题