coalesce_compatible: Coalesce all compatible rows of a data frame

View source: R/consolidate.R

coalesce_compatibleR Documentation

Coalesce all compatible rows of a data frame

Description

This function identifies and coalesces all compatible rows in a data frame. Compatible rows are defined as those rows where all present elements are equal, allowing for equality where one row has an element present and the other is missing the observation.

Usage

coalesce_compatible(.data)

Arguments

.data

data frame to consolidate

Value

A tibble with the missing observations coalesced for compatible rows

Examples

eg1 <- tibble::tribble(
~x, ~y, ~z,
"a", "b", NA,
"a", "b", "c",
"j", "k", NA,
NA, "k", "l")
coalesce_compatible(eg1)

globalgov/qData documentation built on April 10, 2022, 8:48 a.m.