Learn R Programming

validatesuggest (version 0.3.2)

write_na_check: Suggest a check for completeness.

Description

Suggest a check for completeness.

Usage

write_na_check(d, vars = names(d), file = stdout())

suggest_na_check(d, vars = names(d))

Value

suggest_na_check returns validate::validator() object with the suggested rules. write_na_check write the rules to file and returns invisibly a named list of ranges for each variable.

Arguments

d

data.frame, used to generate the checks

vars

character optionally the subset of variables to be used.

file

file to which the checks will be written to.

Examples

Run this code
data(retailers, package="validate")

# will generate check for all columns in retailers that are
# complete.
suggest_na_check(retailers)

Run the code above in your browser using DataLab