Learn R Programming

editrules (version 2.9.6)

Parsing, Applying, and Manipulating Data Cleaning Rules

Description

Please note: active development has moved to packages 'validate' and 'errorlocate'. 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

489

Version

2.9.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Edwin Jonge

Last Published

November 28th, 2025

Functions in editrules (2.9.6)

contains

Determine which edits contain which variable(s)
condition

Get condition matrix from an editset.
contains.boolmat

Determine if a boolean matrix contains var
editarray

Parse textual, categorical edit rules to an editarray
editType

Determine edittypes in editset based on 'contains(E)'
editnames

Names of edits
editrules.plotting

Graphical representation of edits
checkDatamodel

Check data against a datamodel
editset

Read general edits
cateditmatrix

Create an editmatrix with categorical variables
eliminate

Eliminate a variable from a set of edit rules
errorLocalizer_mip

Localize errors using a MIP approach.
errorLocalizer

Create a backtracker object for error localization
fcf.env

Field code forest algorithm
generateEdits

Derive all essentially new implicit edits
editrules_package

An overview of the function of package editrules
getVars.editarray

get variable names in editarray
getVars.cateditmatrix

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

Example editrules, used in vignette
getVars.editlist

get variable names
getVars.editmatrix

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

get index list from editmatrix
getArr

Get named logical array from editarray
datamodel

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

Returns augmented matrix representation of edit set.
getA

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

The errorLocation object
expandEdits

Expand an edit expression
impliedValues

Retrieve values stricktly implied by rules
parseEdits

Parse a character vector 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.
parseMix

Parse a mixed edit
neweditmatrix

Create an editmatrix object from its constituing attributes.
ind2char

Derive textual representation from (partial) indices
getUpperBounds

Get upperbounds of edits, given the boundaries of all variables
is.editrules

Check object class
normalize

Normalizes an editmatrix
parseCat

Parse a categorical edit expression
indFromArray

Compute index from array part of editarray
newerrorlocation

Generate new errorlocation object
simplify

Simplify logical mixed edits in an editset
getVars

get names of variables in a set of edits
print.errorLocation

Print object of class errorLocation
print.locationsummary

summary
getH

Returns the derivation history of an edit matrix or array
getb

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

retrieve edit names from editarray
print.editsummary

summary
getlevels

retrieve level names from editarray
print.editset

print editset
isFeasible

Check consistency of set of edits
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.
isNormalized

Check if an editmatrix is normalized
editfile

Read edits edits from free-form textfile
editmatrix

Create an editmatrix
isObviouslyInfeasible

Check for obvious contradictions in a set of edits
isObviouslyRedundant

Find obvious redundancies in set of edits
getOps

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

Localize errors on records in a data.frame.
getSep

get seprator used to seperate variables from levels in editarray
nedits

Number of edits Count the number of edits in a collection of edits.
softEdits.cateditmatrix

Derive editmatrix with soft constraints. This is a utility function that is used for constructing a mip/lp problem.
softEdits.editarray

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

parse categorial edit
writeELAsMip

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

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

Print violatedEdits
print.cateditmatrix

print cateditmatrix
reduce

Remove redundant variables and edits.
print.editlist

print editset
localize

Workhorse function for localizeErrors
print.editmatrix

print editmatrix
print.editarray

print editarray
violatedEdits

Check data against constraints
substValue

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

Parse a numerical edit expression
print.backtracker

print a backtracker
[.editmatrix

Row index operator for editmatrix
separate

Separate an editset into its disconnected blocks and simplify
removeRedundantDummies

Remove redundant dummy variables
softEdits.editmatrix

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

Backtracker: a flexible and generic binary search program
as.mip

Write an editset into a mip representation
asLevels

Transform a found solution into a categorical record
blocks

Decompose a matrix or edits into independent blocks
as.editmatrix

Coerce a matrix to an edit matrix.
adjacency

Derive adjecency matrix from collection of edits
as.lp.mip

Coerces a mip object into an lpsolve object
as.editset

Coerce x to an editset
disjunct

Decouple a set of conditional edits
echelon

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

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

Check for duplicate edit rules
as.character.cateditmatrix

Coerce an cateditmatrix to a character vector
duplicated.editarray

Check for duplicate edit rules