sc_cols_unique {sanityTracker}R Documentation

Checks that the combination of the specified columns is unique

Description

Checks that the combination of the specified columns is unique

Usage

sc_cols_unique(object, cols = names(object), ...)

Arguments

object

table with a columns specified by cols

cols

vector of characters which combination is checked to be unique

...

further parameters that are passed to add_sanity_check.

Value

see return object of add_sanity_check. Note that if a combination appears 3 times, then n_fail will increased by 3.

Examples

dummy_call <- function(x) {
  sc_cols_unique(
    object = x,
    cols = c("Species", "Sepal.Length",
             "Sepal.Width", "Petal.Length"))
}
dummy_call(x = iris)
get_sanity_checks()
get_sanity_checks()[["example"]]

[Package sanityTracker version 0.1.0 Index]