Learn R Programming

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

editrules (version 2.7.2)

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.7.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Edwin Jonge

Last Published

July 3rd, 2013

Functions in editrules (2.7.2)

datamodel

Summarize data model of an editarray in a data.frame
contains.boolmat

Determine if a boolean matrix contains var
generateEdits

Derive all essentially new implicit edits
adjacency

Derive adjecency matrix from collection of edits
getb

Returns the constant part b of a linear (in)equality
localize

Workhorse function for localizeErrors
editnames

Names of edits
getOps

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

get variable names in editarray
isNormalized

Check if an editmatrix is normalized
ind2char

Derive textual representation from (partial) indices
getUpperBounds

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

Check data against a datamodel
errorLocation

The errorLocation object
neweditmatrix

Create an editmatrix object from its constituing attributes.
adddummies

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

Read general edits
parseEdits

Parse a character vector of edits
getInd

get index list from editmatrix
as.character.cateditmatrix

Coerce an cateditmatrix to a character vector
indFromArray

Compute index from array part of editarray
getSep

get seprator used to seperate variables from levels in editarray
isFeasible

Check consistency of set of edits
parseNum

Parse a numerical edit expression
reduce

Remove redundant variables and edits.
as.editset

Coerce x to an editset
duplicated.editmatrix

Check for duplicate edit rules
getH

Returns the derivation history of an edit matrix or array
edits

Example editrules, used in vignette
editfile

Read edits edits from free-form textfile
print.backtracker

print a backtracker
print.editarray

print editarray
getArr

Get named logical array from editarray
newerrorlocation

Generate new errorlocation object
editrules-package

An overview of the function of package editrules
parseMix

Parse a mixed edit
contains

Determine which edits contain which variable(s)
removeRedundantDummies

Remove redundant dummy variables
violatedEdits

Check data against constraints
blocks

Decompose a matrix or edits into independent blocks
backtracker

Backtracker: a flexible and generic binary search program
getA

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

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

Coerce a matrix to an edit matrix.
errorLocalizer.mip

Localize errors using a MIP approach.
print.editset

print editset
cateditmatrix

Create an editmatrix with categorical variables
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.
nedits

Number of edits Count the number of edits in a collection of edits.
substValue

Replace a variable by a value in a set of edits.
editType

Determine edittypes in editset based on 'contains(E)'
getVars.cateditmatrix

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

get names of variables in a set of edits
isObviouslyRedundant

Find obvious redundancies in set of edits
as.matrix.editarray

Parse textual, categorical edit rules to an editarray
normalize

Normalizes an editmatrix
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.
eliminate

Eliminate a variable from a set of edit rules
asLevels

Transform a found solution into a categorical record
condition

Get condition matrix from an editset.
print.editmatrix

print editmatrix
localizeErrors

Localize errors on records in a data.frame.
writeELAsMip

Rewrite an editset and reported values into the components needed for a mip solver
errorLocalizer

Create a backtracker object for error localization
getlevels

retrieve level names from editarray
simplify

Simplify logical mixed edits in an editset
separate

Separate an editset into its disconnected blocks and simplify
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.
isObviouslyInfeasible

Check for obvious contradictions in a set of edits
isSubset

Check which edits are dominated by other ones.
as.matrix.editmatrix

Create an editmatrix
getnames

retrieve edit names from editarray
disjunct

Decouple a set of conditional edits
print.violatedEdits

Print violatedEdits
print.editlist

print editset
duplicated.editarray

Check for duplicate edit rules
expandEdits

Expand an edit expression
getVars.editmatrix

Returns the variable names of an (in)equality editmatrix E
fcf.env

Field code forest algorithm
editrules.plotting

Graphical representation of edits
print.errorLocation

Print object of class errorLocation
[.editmatrix

Row index operator for editmatrix
getAb

Returns augmented matrix representation of edit set.
parseCat

Parse a categorical edit expression
print.cateditmatrix

print cateditmatrix
is.editrules

Check object class
parseCatEdit

parse categorial edit
editmatrix

Create an editmatrix
editarray

Parse textual, categorical edit rules to an editarray
iter.backtracker

editset

Read general edits