How to replace specific rows with their column sums in R?

前端 未结 0 881
面向向阳花
面向向阳花 2021-01-13 07:58

I feel like there should be a simpler way of doing this. Here is my sample data.

df <- 
  tibble(
    group1 = c(1,1,2,2,3,3,3,3), 
    group2 = c("A&         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题