coalesce_rows.Rd
Often helpful when data has duplicate rows, but column data is split between entries.
coalesce_rows(.data)
.data | A tbl. |
---|
df <- tibble::tribble( ~V1, ~V2, ~V3, ~V4, "A", 1,NA,2, "B", 3,4,3, "C", 5,6,3, "A", 2,3,NA ) df %>% dplyr::group_by(V1) %>% coalesce_rows()#> # A tibble: 3 x 4 #> V1 V2 V3 V4 #> <chr> <dbl> <dbl> <dbl> #> 1 A 1 3 2 #> 2 B 3 4 3 #> 3 C 5 6 3