View source: R/coalesce_rows.R
coalesce_rows | R Documentation |
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.