Learn R Programming

⚠️There's a newer version (2.9.5) of this package.Take me there.

editrules (version 2.5-0)

R package for parsing, applying, and manipulating data cleaning rules

Description

Facilitates reading and manipulating (multivariate) data restrictions (edit rules) on numerical and categorical data. Rules can be defined with common R syntax and parsed to an internal (matrix-like format). Rules can be manipulated with variable elimination and value substitution methods, allowing for feasibility checks and more. Data can be tested against the rules and erroneous fields can be found based on Fellegi and Holt's generalized principle. Rules dependencies can be visualized with using the igraph package.

Copy Link

Version

Install

install.packages('editrules')

Monthly Downloads

410

Version

2.5-0

License

GPL-3

Maintainer

Edwin Jonge

Last Published

June 5th, 2012

Functions in editrules (2.5-0)

getAb

Returns augmented matrix representation of edit set.
editType

Determine edittypes in editset based on 'contains(E)'
duplicated.editarray

Check for duplicate edit rules
asLevels

Transform a found solution into a categorical record
getVars.cateditmatrix

Returns the variable names of an (in)equality editmatrix E
editrules-package

An overview of the function of package editrules
getArr

Get named logical array from editarray
condition

Get condition matrix from an editset.
blocks

Decompose a matrix or edits into independent blocks
print.cateditmatrix

print cateditmatrix
isSubset

Check which edits are dominated by other ones.
print.violatedEdits

Print violatedEdits
as.editmatrix

Coerce a matrix to an edit matrix.
getlevels

retrieve level names from editarray
getnames

retrieve edit names from editarray
isNormalized

Check if an editmatrix is normalized
parseCatEdit

parse categorial edit
fcf.env

Field code forest algorithm
editrules.plotting

Graphical representation of edits
editfile

Read edits edits from free-form textfile
getH

Returns the derivation history of an edit matrix or array
reduce

Remove redundant variables and edits.
createXlim

Utility function for generating sensible boundaries for variables Needed for mip error localization.
print.errorLocation

Print object of class errorLocation
newerrorlocation

Generate new errorlocation object
contains.boolmat

Determine if a boolean matrix contains var
errorLocation

The errorLocation object
separate

Separate an editset into its disconnected blocks and simplify
errorLocalizer.mip

Localize errors using a MIP approach.
getVars

get names of variables in a set of edits
localize

Workhorse function for localizeErrors
adddummies

Add dummy variable to the data.frames, these are needed for errorlocations etc.
getSep

get seprator used to seperate variables from levels in editarray
adjacency

Derive adjecency matrix from collection of edits
neweditarray

editarray: logical array where every column corresponds to one level of one variable. Every row is an edit. Every edit denotes a *forbidden* combination.
as.character.cateditmatrix

Coerce an cateditmatrix to a character vector
editnames

Names of edits
getA

Returns the coefficient matrix A of linear (in)equalities
getUpperBounds

Get upperbounds of edits, given the boundaries of all variables
edits

Example editrules, used in vignette
as.editset

Coerce x to an editset
localizeErrors

Localize errors on records in a data.frame.
print.editarray

print editarray
buildELMatrix

Extend an editset with extra constraints needed for error localization
neweditmatrix

Create an editmatrix object from its constituing attributes.
getVars.editarray

get variable names in editarray
getInd

get index list from editmatrix
softEdits.cateditmatrix

Derive editmatrix with soft constraints based on boundaries of variables. This is a utility function that is used for constructing a mip/lp problem.
cateditmatrix

Create an editmatrix with categorical variables
expandEdits

Expand an edit expression
print.editset

print editset
parseCat

Parse a categorical edit expression
parseEdits

Parse a character vector of edits
datamodel

Summarize data model of an editarray in a data.frame
parseMix

Parse a mixed edit
is.editrules

Check object class
isObviouslyInfeasible

Check for obvious contradictions in a set of edits
isFeasible

Check consistency of set of edits
checkDatamodel

Check data against a datamodel
parseNum

Parse a numerical edit expression
getVars.editmatrix

Returns the variable names of an (in)equality editmatrix E
echelon

Bring an (edit) matrix to reduced row echelon form.
[.editmatrix

Row index operator for editmatrix
print.editlist

print editset
ind2char

Derive textual representation from (partial) indices
iter.backtracker

isObviouslyRedundant

Find obvious redundancies in set of edits
disjunct

Decouple a set of conditional edits
c.editset

Read general edits
generateEdits

Derive all essentially new implicit edits
violatedEdits

Check data against constraints
getOps

Returns the operator part of a linear (in)equality editmatrix E
print.editmatrix

print editmatrix
indFromArray

Compute index from array part of editarray
duplicated.editmatrix

Check for duplicate edit rules
getb

Returns the constant part b of a linear (in)equality
as.matrix.editarray

Parse textual, categorical edit rules to an editarray
normalize

Normalizes an editmatrix
substValue

Replace a variable by a value in a set of edits.
as.matrix.editmatrix

Create an editmatrix
eliminate

Eliminate a variable from a set of edit rules
backtracker

Backtracker: a flexible and generic binary search program
removeRedundantDummies

Remove redundant dummy variables
nedits

Number of edits Count the number of edits in a collection of edits.
print.backtracker

print a backtracker
contains

Determine which edits contain which variable(s)
errorLocalizer

Create a backtracker object for error localization
simplify

Simplify logical mixed edits in an editset
softEdits

Derive editmatrix with soft constraints based on boundaries of variables. This is a utility function that is used for constructing a mip/lp problem.