Learn R Programming

editrules (version 2.9.5)

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

733

Version

2.9.5

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

May 4th, 2024

Functions in editrules (2.9.5)

cateditmatrix

Create an editmatrix with categorical variables
echelon

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

Check for duplicate edit rules
checkDatamodel

Check data against a datamodel
edits

Example editrules, used in vignette
editrules_package

An overview of the function of package editrules
eliminate

Eliminate a variable from a set of edit rules
editset

Read general edits
disjunct

Decouple a set of conditional edits
duplicated.editarray

Check for duplicate edit rules
editnames

Names of edits
editrules.plotting

Graphical representation of edits
editType

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

Parse textual, categorical edit rules to an editarray
getA

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

Returns augmented matrix representation of edit set.
errorLocation

The errorLocation object
expandEdits

Expand an edit expression
editfile

Read edits edits from free-form textfile
getOps

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

Create an editmatrix
getnames

retrieve edit names from editarray
getUpperBounds

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

get seprator used to seperate variables from levels in editarray
getArr

Get named logical array from editarray
getVars.editarray

get variable names in editarray
getInd

get index list from editmatrix
generateEdits

Derive all essentially new implicit edits
getVars

get names of variables in a set of edits
getVars.cateditmatrix

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

retrieve level names from editarray
fcf.env

Field code forest algorithm
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.
errorLocalizer

Create a backtracker object for error localization
getVars.editlist

get variable names
getVars.editmatrix

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

Localize errors using a MIP approach.
indFromArray

Compute index from array part of editarray
is.editrules

Check object class
isSubset

Check which edits are dominated by other ones.
isNormalized

Check if an editmatrix is normalized
parseEdits

Parse a character vector of edits
getH

Returns the derivation history of an edit matrix or array
localizeErrors

Localize errors on records in a data.frame.
isFeasible

Check consistency of set of edits
nedits

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

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

Retrieve values stricktly implied by rules
normalize

Normalizes an editmatrix
ind2char

Derive textual representation from (partial) indices
newerrorlocation

Generate new errorlocation object
parseMix

Parse a mixed edit
parseCat

Parse a categorical edit expression
softEdits.cateditmatrix

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

print editarray
parseNum

Parse a numerical edit expression
print.cateditmatrix

print cateditmatrix
localize

Workhorse function for localizeErrors
isObviouslyInfeasible

Check for obvious contradictions in a set of edits
isObviouslyRedundant

Find obvious redundancies in set of edits
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.
print.backtracker

print a backtracker
print.editmatrix

print editmatrix
neweditmatrix

Create an editmatrix object from its constituing attributes.
print.editsummary

summary
print.editlist

print editset
print.editset

print editset
simplify

Simplify logical mixed edits in an editset
substValue

Replace a variable by a value in a set of edits.
print.errorLocation

Print object of class errorLocation
parseCatEdit

parse categorial edit
removeRedundantDummies

Remove redundant dummy variables
print.locationsummary

summary
violatedEdits

Check data against constraints
reduce

Remove redundant variables and edits.
print.violatedEdits

Print violatedEdits
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.
[.editmatrix

Row index operator for editmatrix
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.
separate

Separate an editset into its disconnected blocks and simplify
writeELAsMip

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

Decompose a matrix or edits into independent blocks
backtracker

Backtracker: a flexible and generic binary search program
asLevels

Transform a found solution into a categorical record
as.editset

Coerce x to an editset
as.mip

Write an editset into a mip representation
adjacency

Derive adjecency matrix from collection of edits
as.editmatrix

Coerce a matrix to an edit matrix.
as.lp.mip

Coerces a mip object into an lpsolve object
as.character.cateditmatrix

Coerce an cateditmatrix to a character vector
adddummies

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

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

Determine which edits contain which variable(s)
contains.boolmat

Determine if a boolean matrix contains var
condition

Get condition matrix from an editset.