View source: R/execute-checks.R
execute_checks | R Documentation |
Execute the checks against a dataset to return a nested list.
execute_checks(ds, checks, origin)
ds |
The data.frame to be checked. Required. |
checks |
The list describing the check. Is the output of |
origin |
The origin of the dataset.
Currently supports "csv" and "REDCap". Required.
|
# Step 0: define paths.
# So this package example executes on every machine, temp files are used.
# Replace the two paths for your specific project
path_data <- system.file("datasets/pt-event-biochemical.rds", package = "trawler")
path_checks <- system.file("checks/checks-biochemical.yml", package = "trawler")
# Step 1: load the check definitions and the dataset to test
ds_pt_event <- readr::read_rds(path_data)
checks <- load_checks(path_checks, origin = "REDCap")
# Step 2: execute the checks and save to an rds file
ds_pt_event |>
execute_checks(checks, origin = "REDCap")
# Save to disk if needed
# ds_pt_event |>
# execute_checks(checks, origin = "REDCap") |>
# readr::write_rds("inst/derived/biochemical.rds")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.