Learn R Programming

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

editrules (version 2.9.3)

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

1,726

Version

2.9.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Edwin Jonge

Last Published

July 1st, 2018

Functions in editrules (2.9.3)

checkDatamodel

Check data against a datamodel
editfile

Read edits edits from free-form textfile
editnames

Names of edits
editarray

Parse textual, categorical edit rules to an editarray
impliedValues

Retrieve values stricktly implied by rules
getb

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

Returns the derivation history of an edit matrix or array
getOps

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

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

Determine if a boolean matrix contains var
errorLocation

The errorLocation object
editrules-package

An overview of the function of package editrules
getSep

get seprator used to seperate variables from levels in editarray
duplicated.editarray

Check for duplicate edit rules
expandEdits

Expand an edit expression
getlevels

retrieve level names from editarray
ind2char

Derive textual representation from (partial) indices
getnames

retrieve edit names from editarray
getAb

Returns augmented matrix representation of edit set.
edits

Example editrules, used in vignette
editmatrix

Create an editmatrix
getArr

Get named logical array from editarray
getInd

get index list from editmatrix
datamodel

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

Find obvious redundancies in set of edits
isObviouslyInfeasible

Check for obvious contradictions in a set of edits
parseCat

Parse a categorical edit expression
newerrorlocation

Generate new errorlocation object
getVars.cateditmatrix

Returns the variable names of an (in)equality editmatrix E
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.
isSubset

Check which edits are dominated by other ones.
getVars.editarray

get variable names in editarray
parseCatEdit

parse categorial edit
print.cateditmatrix

print cateditmatrix
normalize

Normalizes an editmatrix
localize

Workhorse function for localizeErrors
print.editarray

print editarray
parseNum

Parse a numerical edit expression
removeRedundantDummies

Remove redundant dummy variables
separate

Separate an editset into its disconnected blocks and simplify
neweditmatrix

Create an editmatrix object from its constituing attributes.
editset

Read general edits
eliminate

Eliminate a variable from a set of edit rules
generateEdits

Derive all essentially new implicit edits
fcf.env

Field code forest algorithm
reduce

Remove redundant variables and edits.
errorLocalizer

Create a backtracker object for error localization
print.violatedEdits

Print violatedEdits
parseEdits

Parse a character vector of edits
softEdits.cateditmatrix

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

print a backtracker
errorLocalizer_mip

Localize errors using a MIP approach.
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.
getVars.editmatrix

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

get variable names
parseMix

Parse a mixed edit
print.errorLocation

Print object of class errorLocation
getUpperBounds

Get upperbounds of edits, given the boundaries of all variables
print.locationsummary

summary
writeELAsMip

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

get names of variables in a set of edits
isNormalized

Check if an editmatrix is normalized
isFeasible

Check consistency of set of edits
localizeErrors

Localize errors on records in a data.frame.
is.editrules

Check object class
indFromArray

Compute index from array part of editarray
nedits

Number of edits Count the number of edits in a collection of edits.
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
print.editsummary

summary
print.editset

print editset
print.editmatrix

print editmatrix
print.editlist

print editset
simplify

Simplify logical mixed edits in an editset
substValue

Replace a variable by a value in a 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.
violatedEdits

Check data against constraints
as.editmatrix

Coerce a matrix to an edit matrix.
as.character.cateditmatrix

Coerce an cateditmatrix to a character vector
backtracker

Backtracker: a flexible and generic binary search program
adddummies

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

Coerce x to an editset
as.mip

Write an editset into a mip representation
as.lp.mip

Coerces a mip object into an lpsolve object
asLevels

Transform a found solution into a categorical record
disjunct

Decouple a set of conditional edits
blocks

Decompose a matrix or edits into independent blocks
condition

Get condition matrix from an editset.
contains

Determine which edits contain which variable(s)
getA

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

Derive adjecency matrix from collection of edits
duplicated.editmatrix

Check for duplicate edit rules
editrules.plotting

Graphical representation of edits
echelon

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

Create an editmatrix with categorical variables