sc_cols_non_NA: Checks that all elements from the specified columns are not...

Description Usage Arguments Value Examples

View source: R/convenience.R

Description

Checks that all elements from the specified columns are not NA

Usage

1
sc_cols_non_NA(object, cols = names(object), ..., unk_cols_callback = stop)

Arguments

object

table with a columns specified by cols

cols

vector of characters of columns that are checked for NAs

...

further parameters that are passed to add_sanity_check.

unk_cols_callback

user-defined function that is called if some of the cols are not contained in the object. This is helpful if an additional warning or error should be thrown or maybe a log-entry should be created. Default is the function stop

Value

a list where every element is an object returned by add_sanity_check for each column specified in cols that exists in object

Examples

1
2
3
4
5
6
iris[c(1,3,5,7,9), 1] <- NA
dummy_call <- function(x) {
  sc_cols_non_NA(object = iris, description = "No NAs expected in iris")
}
dummy_call(x = iris)
get_sanity_checks()

sanityTracker documentation built on April 22, 2020, 5:09 p.m.