Skip to contents

Validates whether values in the dataset fall within expected ranges for analysis. Used primarily as a safeguard to identify possible data entry errors.

Usage

check_ranges(d)

Arguments

d

A data frame prepared via the prepare_data function.

Value

Prints a message listing any out-of-range values and may terminate execution if invalid data are detected.

See also

prepare_data() is a wrapper of this function.

Examples

if (FALSE) { # \dontrun{
p <- data_paths("data-raw")
data <- prepare_data(p)  # Automatically performs range checks
} # }