doubleDataEntry: Double data entry check

Description Usage Arguments Value Examples

View source: R/doubleDataEntry.R

Description

Deprecated–use double_entry_check(). This function takes two data frames that have identical column names, which should also have idenctical records, and returns a table of errors where the two tables don't match up.

Usage

1
doubleDataEntry(x, y, id)

Arguments

x, y

Two data.frames with identical column names

id

Character vector of column(s) to join the two data.frames

Value

A data.frame with columns error_number, id, x, and y. The last two columns specify what the discrepancy is for each input data.frame.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
repository_A <- data.frame(subject = rep(LETTERS[1:5], 2), visit = rep(1:5, 2), case = 1:10,
                           specimen = c(rep("DNA", 2), rep("Plasma", 3),
                           rep("Serum", 3), rep("RNA", 2)),
                           aliquots = 1:10, stringsAsFactors = FALSE)

repository_B <- data.frame(subject = c(rep(LETTERS[1:5], 2), rep(LETTERS[6], 2)),
                           visit = c(rep(1:5, 2), 6:7), case = 1:12,
                           specimen = c(rep("DNA", 2), rep("Plasma", 2), "RNA",
                                        rep("Serum", 2), rep("RNA", 2), rep("DNA", 3)),
                           aliquots = c(NA, 2:8, 12, 10, 11, 13), stringsAsFactors = FALSE)

errors <- doubleDataEntry(repository_A, repository_B, id = c("subject", "visit", "case"))

NateByers/Reconcile documentation built on Nov. 21, 2021, 4:12 p.m.