is_unique: Determine whether a column in a data frame is unique across...

Description Usage Arguments Value Examples

View source: R/trahelyk.R

Description

Determine whether a column in a data frame is unique across all rows

Usage

1
is_unique(x, guid, quiet = FALSE)

Arguments

x

A data frame

guid

Name of the column to evaluate for uniqueness

quiet

Logical. If FALSE, the function echoes the number of unique values of 'guid'; if TRUE, it only returns a logical.

Value

Logical indicating whether the guid is unique across rows

Examples

1
2
3
4
foo <- tibble(A = c(1, 2, 3, 4, 5),
              B = c("A", "B", "B", "C", "D"))
is_unique(foo, "A")
is_unique(foo, "B")

trahelyk/trahelyk_pkg documentation built on June 14, 2021, 9:25 p.m.