Skip to contents

Compares patient names between a manually entered dataset and a reference set of correct names (e.g., from REDCap) to identify discrepancies.

Usage

check_names(d, nms)

Arguments

d

A data frame containing patient names to be checked (e.g., hand-written data).

nms

A data frame or vector containing the correct patient names (e.g., from REDCap).

Value

Prints a message listing any discrepancies found. Intended to be called within the prepare_data() function, where it can optionally be silenced.

See also

Examples

if (FALSE) { # \dontrun{
p <- data_paths("data-raw")

# With name checking:
data <- prepare_data(p, check.names = TRUE)

# Without name checking:
data <- prepare_data(p, check.names = FALSE)
} # }