checkColsFormUniqueKeys: Check that a set of columns form unique keys.

Description Usage Arguments Value Examples

View source: R/compare_frames.R

Description

For local data.frame only.

Usage

1

Arguments

data

data.frame to work with.

keyColNames

character array of column names to check.

Value

logical TRUE if the rows of data are unique addressable by the columns named in keyColNames.

Examples

1
2
3
d <- data.frame(key = c('a','a', 'b'), k2 = c(1 ,2, 2))
checkColsFormUniqueKeys(d, 'key') # should be FALSE
checkColsFormUniqueKeys(d, c('key', 'k2')) # should be TRUE

WinVector/wrapr documentation built on Nov. 21, 2020, 8:31 p.m.