editrules: Parsing, Applying, and Manipulating Data Cleaning Rules

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.

Author
Edwin de Jonge, Mark van der Loo
Date of publication
2015-06-11 11:16:28
Maintainer
Edwin de Jonge <edwindjonge@gmail.com>
License
GPL-3
Version
2.9.0
URLs

View on CRAN

Man pages

adddummies
Add dummy variable to the data.frames, these are needed for...
adjacency
Derive adjecency matrix from collection of edits
as.character.cateditmatrix
Coerce an cateditmatrix to a 'character' vector
as.editmatrix
Coerce a matrix to an edit matrix.
as.editset
Coerce x to an editset
asLevels
Transform a found solution into a categorical record
as.lp.mip
Coerces a 'mip' object into an lpsolve object
as.mip
Write an editset into a mip representation
backtracker
Backtracker: a flexible and generic binary search program
blocks
Decompose a matrix or edits into independent blocks
cateditmatrix
Create an editmatrix with categorical variables
checkDatamodel
Check data against a datamodel
condition
Get condition matrix from an editset.
contains
Determine which edits contain which variable(s)
contains.boolmat
Determine if a boolean matrix contains 'var'
datamodel
Summarize data model of an editarray in a data.frame
disjunct
Decouple a set of conditional edits
duplicated.editarray
Check for duplicate edit rules
duplicated.editmatrix
Check for duplicate edit rules
echelon
Bring an (edit) matrix to reduced row echelon form.
editarray
convert to matrix
editfile
Read edits edits from free-form textfile
editmatrix
convert to matrix
editnames
Names of edits
editrules-package
An overview of the function of package 'editrules'
editrules.plotting
Graphical representation of edits
edits
Example editrules, used in vignette
editset
Read general edits
editType
Determine edittypes in editset based on 'contains(E)'
eliminate
Eliminate a variable from a set of edit rules
errorLocalizer
Create a backtracker object for error localization
errorLocalizer_mip
Localize errors using a MIP approach.
errorLocation
The errorLocation object
expandEdits
Expand an edit expression
fcf.env
Field code forest algorithm
generateEdits
Derive all essentially new implicit edits
getA
Returns the coefficient matrix 'A' of linear (in)equalities
getAb
Returns augmented matrix representation of edit set.
getArr
Get named logical array from editarray
getb
Returns the constant part 'b' of a linear (in)equality
geth
Returns the derivation history of an edit matrix or array
getInd
get index list from editmatrix
getlevels
retrieve level names from editarray
getnames
retrieve edit names from editarray
getOps
Returns the operator part of a linear (in)equality...
getSep
get seprator used to seperate variables from levels in...
getUpperBounds
Get upperbounds of edits, given the boundaries of all...
getVars
get names of variables in a set of edits
getVars.cateditmatrix
Returns the variable names of an (in)equality 'editmatrix' E
getVars.editarray
get variable names in editarray
getVars.editlist
get variable names
getVars.editmatrix
Returns the variable names of an (in)equality 'editmatrix' E
impliedValues
Retrieve values stricktly implied by rules
ind2char
Derive textual representation from (partial) indices
indFromArray
Compute index from array part of editarray
is.editrules
Check object class
isFeasible
Check consistency of set of edits
isNormalized
Check if an editmatrix is normalized
isObviouslyInfeasible
Check for obvious contradictions in a set of edits
isObviouslyRedundant
Find obvious redundancies in set of edits
isSubset
Check which edits are dominated by other ones.
localize
Workhorse function for localizeErrors
localizeErrors
Localize errors on records in a data.frame.
nedits
Number of edits Count the number of edits in a collection of...
neweditarray
editarray: logical array where every column corresponds to...
neweditmatrix
Create an 'editmatrix' object from its constituing...
newerrorlocation
Generate new errorlocation object
normalize
Normalizes an editmatrix
parseCat
Parse a categorical edit expression
parseCatEdit
parse categorial edit
parseEdits
Parse a character vector of edits
parseMix
Parse a mixed edit
parseNum
Parse a numerical edit expression
print.backtracker
print a backtracker
print.cateditmatrix
print cateditmatrix
print.editarray
print editarray
print.editlist
print editset
print.editmatrix
print editmatrix
print.editset
print editset
print.editsummary
summary
print.errorLocation
Print object of class errorLocation
print.locationsummary
summary
print.violatedEdits
Print violatedEdits
reduce
Remove redundant variables and edits.
removeRedundantDummies
Remove redundant dummy variables
separate
Separate an editset into its disconnected blocks and simplify
simplify
Simplify logical mixed edits in an editset
softEdits
Derive editmatrix with soft constraints based on boundaries...
softEdits.cateditmatrix
Derive editmatrix with soft constraints. This is a utility...
softEdits.editarray
Derive editmatrix with soft constraints based on boundaries...
softEdits.editmatrix
Derive editmatrix with soft constraints based on boundaries...
subsetting
Row index operator for 'editmatrix'
substValue
Replace a variable by a value in a set of edits.
violatedEdits
Check data against constraints
writeELAsMip
Rewrite an editset and reported values into the components...

Files in this package

editrules
editrules/inst
editrules/inst/script
editrules/inst/script/edits
editrules/inst/script/edits/mixedits.R
editrules/inst/script/edits/myedits.txt
editrules/inst/script/bench
editrules/inst/script/bench/benchmip_mixed.R
editrules/inst/script/bench/randomEdits.R
editrules/inst/script/bench/edits.R
editrules/inst/script/bench/benchmip_categorical.R
editrules/inst/script/bench/benchAB.R
editrules/inst/script/bench/benchMIP.R
editrules/inst/script/bench/eliminator.R
editrules/inst/script/bench/benchmip_mixed2.R
editrules/inst/script/bench/benchmip_balance.R
editrules/inst/doc
editrules/inst/doc/index.html
editrules/inst/doc/DeJongeVanderLoo2011-2.pdf
editrules/inst/doc/DeJongeVanderLoo2011.pdf
editrules/inst/doc/editrules-vignette.Rnw
editrules/inst/doc/editrules-vignette.pdf
editrules/tests
editrules/tests/test_all.R
editrules/tests/testthat
editrules/tests/testthat/testeditmatrix.R
editrules/tests/testthat/testlocalizeErrors_mip.R
editrules/tests/testthat/testCheckDatamodel.R
editrules/tests/testthat/testViolatedEdits.R
editrules/tests/testthat/testFourierMotzkin.R
editrules/tests/testthat/testSubstValue.R
editrules/tests/testthat/testeditmatrixAttr.R
editrules/tests/testthat/edit_test_1.txt
editrules/tests/testthat/testParseEdits.R
editrules/tests/testthat/testIsFeasible.R
editrules/tests/testthat/testIsObviouslyRedundant.R
editrules/tests/testthat/testCheck.R
editrules/tests/testthat/testechelon.R
editrules/tests/testthat/testgetVars.R
editrules/tests/testthat/testdatamodel.R
editrules/tests/testthat/testIsObviouslyInfeasible.R
editrules/tests/testthat/testErrorLocalizer.R
editrules/tests/testthat/testEditset.R
editrules/tests/testthat/testeditarray.R
editrules/tests/testthat/testDuplicated.R
editrules/tests/testthat/testBlocks.R
editrules/tests/testthat/testc.R
editrules/tests/testthat/testContains.R
editrules/tests/testthat/testEditRow.R
editrules/tests/testthat/testLocalizeErrors.R
editrules/NAMESPACE
editrules/NEWS
editrules/data
editrules/data/edits.RData
editrules/R
editrules/R/editrules-data.R
editrules/R/list2env.R
editrules/R/echelon.R
editrules/R/violatedEdits.R
editrules/R/isSubset.R
editrules/R/parseMix.R
editrules/R/subsetting.R
editrules/R/cateditmatrix.R
editrules/R/duplicated.R
editrules/R/errorLocation.R
editrules/R/editmatrixAttr.R
editrules/R/perturbWeights.R
editrules/R/mip.R
editrules/R/eliminate.R
editrules/R/plot.R
editrules/R/pkg.R
editrules/R/reduce.R
editrules/R/as.matrix.R
editrules/R/c.R
editrules/R/editset.R
editrules/R/isObviouslyRedundant.R
editrules/R/contains.R
editrules/R/editmatrix.R
editrules/R/disjunct.R
editrules/R/editAttr.R
editrules/R/getH.R
editrules/R/softEdits.R
editrules/R/parseNum.R
editrules/R/removeRedundant.R
editrules/R/plot_errorLocation.R
editrules/R/editfile.R
editrules/R/is.R
editrules/R/checkRows.R
editrules/R/print.R
editrules/R/localizeErrors.R
editrules/R/getUpperBounds.R
editrules/R/as.igraph.R
editrules/R/getVars.R
editrules/R/expandEdits.R
editrules/R/editarrayAttr.R
editrules/R/isObviouslyInfeasible.R
editrules/R/parseCat.R
editrules/R/checkDatamodel.R
editrules/R/backtracker.R
editrules/R/summary.R
editrules/R/str.R
editrules/R/errorLocalizer_mip.R
editrules/R/blocks.R
editrules/R/isFeasible.R
editrules/R/writeELAsMip.R
editrules/R/errorLocalizer.R
editrules/R/zzz.R
editrules/R/substValue.R
editrules/R/parseEdits.R
editrules/R/adjacency.R
editrules/R/editarray.R
editrules/R/generateEdits.R
editrules/vignettes
editrules/vignettes/editrules-vignette.Rnw
editrules/MD5
editrules/build
editrules/build/vignette.rds
editrules/DESCRIPTION
editrules/man
editrules/man/getSep.Rd
editrules/man/editfile.Rd
editrules/man/substValue.Rd
editrules/man/as.character.cateditmatrix.Rd
editrules/man/adjacency.Rd
editrules/man/isFeasible.Rd
editrules/man/adddummies.Rd
editrules/man/isObviouslyInfeasible.Rd
editrules/man/editnames.Rd
editrules/man/impliedValues.Rd
editrules/man/as.editset.Rd
editrules/man/getVars.Rd
editrules/man/neweditarray.Rd
editrules/man/subsetting.Rd
editrules/man/editmatrix.Rd
editrules/man/nedits.Rd
editrules/man/cateditmatrix.Rd
editrules/man/expandEdits.Rd
editrules/man/print.violatedEdits.Rd
editrules/man/as.editmatrix.Rd
editrules/man/errorLocalizer.Rd
editrules/man/removeRedundantDummies.Rd
editrules/man/parseEdits.Rd
editrules/man/parseNum.Rd
editrules/man/errorLocalizer_mip.Rd
editrules/man/errorLocation.Rd
editrules/man/is.editrules.Rd
editrules/man/edits.Rd
editrules/man/parseCat.Rd
editrules/man/getInd.Rd
editrules/man/datamodel.Rd
editrules/man/editrules-package.Rd
editrules/man/parseCatEdit.Rd
editrules/man/print.editmatrix.Rd
editrules/man/localize.Rd
editrules/man/newerrorlocation.Rd
editrules/man/softEdits.editmatrix.Rd
editrules/man/fcf.env.Rd
editrules/man/isNormalized.Rd
editrules/man/as.lp.mip.Rd
editrules/man/softEdits.Rd
editrules/man/asLevels.Rd
editrules/man/localizeErrors.Rd
editrules/man/print.locationsummary.Rd
editrules/man/getArr.Rd
editrules/man/print.backtracker.Rd
editrules/man/violatedEdits.Rd
editrules/man/separate.Rd
editrules/man/disjunct.Rd
editrules/man/getVars.cateditmatrix.Rd
editrules/man/parseMix.Rd
editrules/man/indFromArray.Rd
editrules/man/getA.Rd
editrules/man/generateEdits.Rd
editrules/man/editrules.plotting.Rd
editrules/man/checkDatamodel.Rd
editrules/man/editarray.Rd
editrules/man/getOps.Rd
editrules/man/ind2char.Rd
editrules/man/writeELAsMip.Rd
editrules/man/neweditmatrix.Rd
editrules/man/contains.boolmat.Rd
editrules/man/softEdits.cateditmatrix.Rd
editrules/man/softEdits.editarray.Rd
editrules/man/geth.Rd
editrules/man/getVars.editmatrix.Rd
editrules/man/eliminate.Rd
editrules/man/getVars.editlist.Rd
editrules/man/editset.Rd
editrules/man/editType.Rd
editrules/man/blocks.Rd
editrules/man/print.editsummary.Rd
editrules/man/getnames.Rd
editrules/man/print.editset.Rd
editrules/man/normalize.Rd
editrules/man/simplify.Rd
editrules/man/contains.Rd
editrules/man/print.errorLocation.Rd
editrules/man/reduce.Rd
editrules/man/getlevels.Rd
editrules/man/print.editlist.Rd
editrules/man/duplicated.editarray.Rd
editrules/man/duplicated.editmatrix.Rd
editrules/man/getAb.Rd
editrules/man/condition.Rd
editrules/man/as.mip.Rd
editrules/man/getUpperBounds.Rd
editrules/man/getb.Rd
editrules/man/isSubset.Rd
editrules/man/echelon.Rd
editrules/man/backtracker.Rd
editrules/man/getVars.editarray.Rd
editrules/man/print.cateditmatrix.Rd
editrules/man/isObviouslyRedundant.Rd
editrules/man/print.editarray.Rd