Skip to content

Commit 74e43aa

Browse files
committed
updating documentation
2 parents 980d9e5 + 5ce4a64 commit 74e43aa

25 files changed

+306
-137
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: errorlocate
22
Type: Package
33
Title: Locate Errors with Validation Rules
4-
Version: 1.1.1
4+
Version: 1.1.2
55
Authors@R: c(person("Edwin", "de Jonge", email = "[email protected]", role = c("aut", "cre"), comment=c(ORCID="0000-0002-6580-4718")),
66
person("Mark", "van der Loo", email = "[email protected]", role = c("aut")))
77
Description: Errors in data can be located and removed using validation rules from package
@@ -21,7 +21,7 @@ Suggests:
2121
covr,
2222
knitr,
2323
rmarkdown
24-
RoxygenNote: 7.2.3
24+
RoxygenNote: 7.3.2
2525
Encoding: UTF-8
2626
Collate:
2727
'MipRules.R'

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Generated by roxygen2: do not edit by hand
22

33
S3method(as.character,dnf)
4+
S3method(as.character,mip_rule)
45
S3method(as.data.frame,errorlocation)
56
S3method(as.expression,dnf)
67
S3method(print,dnf)

R/MipRules.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Create a mip object from a validator object
22
#'
3-
#' Create a mip object from [validator()] object.
3+
#' Create a mip object from [validate::validator()] object.
44
#' This is a utility class that translates a validor object into a mixed integer problem that
55
#' can be solved.
66
#' Most users should use [locate_errors()] which will handle all translation and execution

R/errorlocalizer.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ setRefClass("ErrorLocalizer",
2121
)
2222
)
2323

24-
#' Feligi-Holt Errorlocalizer
24+
#' Fellegi-Holt Errorlocalizer
2525
#'
26-
#' Implementation of the Feligi-Holt algorithm using the `ErrorLocalizer` base class.
27-
#' Given a set of validation rules and a dataset the Feligi-Holt algorithm finds for each record
26+
#' Implementation of the Fellegi-Holt algorithm using the `ErrorLocalizer` base class.
27+
#' Given a set of validation rules and a dataset the Fellegi-Holt algorithm finds for each record
2828
#' the smallest (weighted) combination of variables that are erroneous (if any).
2929
#'
3030
#' @note Most users do not need this class and can use [locate_errors()].
3131
#'
32-
#' `errorlocalizer` implements feligi holt using a MIP-solver. For problems in which
32+
#' `errorlocalizer` implements Fellegi holt using a MIP-solver. For problems in which
3333
#' coefficients of the validation rules or the data are too different, you should consider scaling
3434
#' the data.
3535
#' @include MipRules.R

R/errorlocate-package.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' Find errors in data given a set of validation rules.
44
#' The `errorlocate` helps to identify obvious errors in raw datasets.
55
#'
6-
#' It works in tandem with the package [validate()].
6+
#' It works in tandem with the package `validate`.
77
#' With `validate` you formulate data validation rules to which the data must comply.
88
#' For example:
99
#'

R/errorlocation.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
#'
1313
#'
1414
#' Current implementation assumes that errors are record based. The error locations can be retrieved
15-
#' using the method [values()] and are a matrix of
15+
#' using the method [validate::values()] and are a matrix of
1616
#' rows and columns, with the same dimensions are the `data.frame` that was checked.
1717
#' For errors that are purely column based, or dataset based, errorlocations will return a matrix with all
1818
#' rows or cells set to `TRUE`.
19-
#' The [values()] return `NA` for missing values.
19+
#' The [validate::values()] return `NA` for missing values.
2020

2121
#' @section Fields:
2222
#'

R/linear.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LOGS <- c("log", "log1p", "log10", "log2")
1010
#' categorical and conditional rules to be used in finding errors. Other rule types
1111
#' are ignored during error finding.
1212
#' @export
13-
#' @param x [validator()] object containing data validation rules
13+
#' @param x [validate::validator()] object containing data validation rules
1414
#' @param ... not used
1515
#' @return `logical` indicating which rules are (purely) linear.
1616
#' @family rule type

R/locate-errors.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#'
33
#' Find out which fields in a data.frame are "faulty" using validation rules
44
#' This method returns found errors, according to the specified method `x`.
5-
#' Use method [replace_errors()], to automatically remove these errors.
5+
#' Use method [replace_errors()], to automatically remove these errors. Use
6+
#' `[base::set.seed()]` beforehand to make the function call reproducible.
67
#' `
78
#'
89
#' Use an `Inf` `weight` specification to fixate variables that can not be changed.

R/mip_lpsolve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#' @param rules mip rules
77
#' @param objective function
88
#' @param eps accuracy for equality/inequality
9-
#' @param ... additional [lp.control()] parameters that are set for the mip problem
9+
#' @param ... additional [lpSolveAPI::lp.control()] parameters that are set for the mip problem
1010
translate_mip_lp <- function( rules
1111
, objective=NULL
1212
, eps = 1e-3

R/mip_rule.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ mip_rule <- function(a, op, b, rule, type, weight=Inf, ...){
1818
)
1919
}
2020

21+
#' @export
2122
as.character.mip_rule <- function(x, ...){
2223
a <- paste0(x$a, "*", names(x$a), collapse= ' + ')
2324

@@ -29,6 +30,7 @@ as.character.mip_rule <- function(x, ...){
2930
paste0(a, " ",x$op, " ", x$b, sep = "")
3031
}
3132

33+
#' @export
3234
print.mip_rule <- function(x, ...){
3335
a <- paste0(x$a, "*", names(x$a), collapse= ' + ')
3436

0 commit comments

Comments
 (0)