clean_messy_groups: Simplify data to a single value within a group

Description Usage Arguments Value Functions

View source: R/clean_messy_groups.R

Description

During dataset generation, sometimes data from different sources may put missing values where consistent results should be present.

Usage

1
2
3
clean_messy_groups(data, keys, values, missing_value = NA)

replace_messy_groups(data, keys, values, missing_value = NA)

Arguments

data

The dataset (typically a data.frame or similar) to simplify

keys

Column names (as character strings) for grouping

values

Columns to from the original data as values that must be unique within a group (defaults to all columns other than keys)

missing_value

A scalar value indicating what should be considered missing and should be used for replacement if all values are missing (typically NA).

Value

A dataset with one row per key and one value in each column.

Functions


billdenney/pknca.portation documentation built on May 3, 2019, 2:55 p.m.