Skip to contents

Takes in file paths to raw data, checks their format and compatibility, and if valid, proceeds to import and pre-process the data for analysis. This function serves as the main entry point for assembling a clean dataset from raw sources.

Usage

prepare_data(p, check.names = TRUE)

Arguments

p

A named character vector of file paths generated by data_paths.

check.names

A logical indicating whether check_names should be run to compare names in meta data and item data.

Value

A tibble containing cleaned and pre-processed variables ready for analysis. The function also performs validation checks and prints warnings or stops execution if critical issues are detected (e.g., mismatched names or out-of-range values).

See also

Examples

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