Learn R Programming

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

editrules (version 2.0-3)

R package for parsing and manipulating edit 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 and rules can be visualized with the igraph package.

Copy Link

Version

Install

install.packages('editrules')

Monthly Downloads

559

Version

2.0-3

License

GPL-3

Maintainer

Edwin Jonge

Last Published

January 12th, 2012

Functions in editrules (2.0-3)

contains.boolmat

determine if a boolean matrix contains var
is.editmatrix

Check if object is an editmatrix
buildELMatrix.editmatrix

Extend an editmatrix with extra constraints needed for error localization
duplicated.editmatrix

Check for duplicate edit rules
duplicated.editarray

Check for duplicate edit rules
backtracker

Backtracker: a flexible and generic binary search program
adjacency

Derive adjecency matrix from set of edits
iter.backtracker

getSep

get seprator used to seperate variables from levels in editarray
editrules-package

Facilitates reading and manipulation of linear (in)equalities, converting them into matrix format (and vice versa) and checking if data are valid according to these rules. Sets of linear edits can be manipulated using Fourier-Motzkin elimination and variable substitution and solving error localization problems based on the generalized principle of Felligi and Holt.
as.data.frame.editarray

Coerce an editarray to a data.frame
editarray

Parse textual, categorical edit rules to an editarray
getVars.editarray

get variable names in editarray
as.matrix.editmatrix

Coerce an editmatrix to a normal matrix
as.data.frame.violatedEdits

as.data.frame violatedEdits
checkRows

Check rows of data.frame against edits.
echelon

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

Retrieve readables editrules from an editmatrix
buildELMatrix

Extend an editmatrix or editarray with extra constraints needed for error localization
as.character.cateditmatrix

Coerce an cateditmatrix to a character vector
getArr

Get named logical array from editarray
c.editarray

concatenate editarray
checkDatamodel

Check data against a datamodel
getAb

Returns augmented matrix representation of edit set.
localize

Workhorse function for localizeErrors
contains

determine which edits in an editmatrix contain a variable.
as.data.frame.editmatrix

Coerce an editmatrix to a data.frame
print.errorLocation

Print object of class errorLocation
localize_mip_rec

Localize errors by using lpSolveApi
listViolatedEdits

Lists which rows of data.frame dat violate which constraints
editmatrix

Create an editmatrix
as.character.editmatrix

Coerce an editmatrix to a character vector
getb

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

Compute index from array part of editarray
errorLocation

The errorLocation object
getVars.editmatrix

Returns the variable names of an (in)equality editmatrix E
summary.violatedEdits

Summary statistics on violatedEdits
parseNum

Parse a numerical edit expression
parseMix

Parse a mixed edit
isSubset

Check if any edit rule is a subset of another one
getA

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

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

print a backtracker
isRedundant.boolmat

Check redundancy in editarray after disection
parseCatEdit

parse categorial edit
cateditmatrix

Create an editmatrix with categorical variables
c.editmatrix

concatenate editmatrix
isObviouslyInfeasible

Check for obviously infeasible edit rules
isNormalized

Check if an editmatrix is normalized
print.violatedEdits

Print violatedEdits
getVars.cateditmatrix

Returns the variable names of an (in)equality editmatrix E
is.cateditmatrix

Check if object is a cateditmatrix
localizeErrors

Localize errors on records in a data.frame.
parseCat

Parse a categorical edit expression
expandEdits

Expand an edit expression
numcat

return vector with number of categories for each variable in editarray
editTypes

basic test for type of edit
str.editarray

str method for editarray object
datamodel

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

Retrieve which rows of data.frame dat violate which constraints
getlevels

retrieve level names from editarray
getInd

get index list from editmatrix
print.editset

print editset
as.editmatrix

Coerce a matrix to an edit matrix.
editfile

Read edits edits from free-form textfile
print.editarray

print editarray
isObviouslyRedundant

Find obvious redundancies in set of edits
toDataFrame

Coerce an editmatrix to a data.frame
neweditmatrix

Create an editmatrix object from its constituing attributes.
str.editmatrix

str method for editmatrix object
summary.editmatrix

Summarize
getH

Returns the derivation history of an edit matrix or array
getOps

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

Coerce an editarray to a boolean matrix
fcf.env

Field code forest algorithm
getnames

retrieve edit names from editarray
is.editarray

check if an object is an editarray
as.expression.editarray

Coerce an editarray to R expressions
fcf

Derive all essentially new implicit edits
blocks

Break a matrix into blocks
substValue

Replace a variable by a value in a set of edits.
plot.editmatrix

Graphical representation of editmatrix
isFeasible

Check consistency of edit set
print.cateditmatrix

print cateditmatrix
parseEdits

Parse a character vector of edits
plot.errorLocation

plot errorLocation object
edits

Example editrules, used in vignette
normalize

Normalizes an editmatrix
print.editmatrix

print editmatrix
ind2char

Derive textual representation from (partial) indices
reduce

Remove empty rows and variables from set of edits
adddummies

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

Coerce an editarray to character
newerrorlocation

Generate new errorlocation object
[.editmatrix

Row index operator for editmatrix
as.expression.editmatrix

Coerce an editmatrix to R expressions
asLevels

Transform a found solution into a categorical record
editset

Create an editset which can contain a mix of categorical, numerical and mixededits
eliminate

eliminate a variable from a set of edit rules
errorLocalizer

Localize errors in numerical data based on the paradigm of Fellegi and Holt.
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.
plot.violatedEdits

Plot summary statistics on violatedEdits