Learn R Programming

editrules (version 2.0-3)

checkDatamodel: Check data against a datamodel

Description

Variables in dat which also occur in E are checked against the datamodel for those variables. Currently, this function is only usefull for categorical data (i.e. objects of class editarray

Currently, this method returns NULL, and is only used internally.

In an editarray, each row codes a multivariate edit, while the columns define the datamodel. This function checks if every variable, occuring in dat takes values in the datamodel of E. The function is used by localizeErrors prior to performing error localization on multivariate edits.

Usage

checkDatamodel(E, dat, weight = rep(1, ncol(dat)), ...)

## S3 method for class 'editmatrix': checkDatamodel(E, dat, weight = rep(1, ncol(dat)), ...)

## S3 method for class 'editarray': checkDatamodel(E, dat, weight = rep(1, ncol(dat)), ...)

Arguments

E
an object of class editarray or editmatrix
dat
a data.frame
weight
vector of weigths for every variable of dat or an array of weight of the same dimensions as dat.
...
arguments to be passed to or from other methods

Value