duplicate_keys: Find duplicate keys in a dataframe.

Description Usage Arguments Value Examples

Description

Return a vector of the duplicate keys within a dataframe. Filters out NA values before determining duplicates.

Usage

1

Arguments

df

The dataframe to check for duplicate keys.

...

The column(s) to check for duplicates.

Value

A tibble containing the duplicate keys and a count of the number of duplicates.

Examples

1
2
3
4
5
6
7
8
## dataframe to convert
key <- c(1000L, 2000L, 3000L, 4000L, 1000L)
amount <- c("46.41", "118.11", "84.68", "493.59", "51.10")

test_df <- data.frame(key, amount)

## which keys are duplicated
duplicate_keys(df = test_df, "key")

curtisalexander/CRAmisc documentation built on May 14, 2019, 12:52 p.m.