Learn R Programming

datacheck (version 1.0.0)

is.datadict.profile: is.datadict.profile

Description

Is this a datadict.profile object

Usage

is.datadict.profile(x)

Arguments

x
The object to be tested.

Value

  • boolean

See Also

Other datadict: as.rules, datadict.profile, has.ruleErrors, prep4rep, read.rules

Examples

Run this code
# Get example data files
atable = system.file("examples/db.csv", package='datacheck')
arule  = system.file("examples/rules1.R", package='datacheck')
aloctn = system.file("examples/location.csv", package='datacheck') # for use in is.oneOf

ctable = basename(atable)
crule  = basename(arule)
cloctn = basename(aloctn)

cwd = tempdir()
owd = getwd()
setwd(cwd)

file.copy(atable, ctable)
file.copy(arule,  crule)
file.copy(aloctn, cloctn)

at = read.csv(ctable, stringsAsFactors = FALSE)
ad = read.rules(crule)

db = datadict.profile(at, ad)

is.datadict.profile(db) == TRUE

db

setwd(owd)

Run the code above in your browser using DataLab