coalesce_rows: Coalesce columns of a data frame

View source: R/coalesce_rows.R

coalesce_rowsR Documentation

Coalesce columns of a data frame

Description

Often helpful when data has duplicate rows, but column data is split between entries.

Usage

coalesce_rows(.data)

Arguments

.data

A tbl.

Examples

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()

overdodactyl/mRclwhip documentation built on June 30, 2023, 6:24 a.m.