rf <- tempfile(fileext = ".yaml")
writeLines(c("checks:", " - id: R001", " type: range",
" variable: score", " min: 0", " max: 100"), rf)
csv <- tempfile(fileext = ".csv")
writeLines(c("sid,score", "S1,90", "S2,150"), csv)
if (requireNamespace("yaml", quietly = TRUE)) {
cfg <- dcc_config(dcc_rules(rf), id_var = "sid")
dcc_run_files(dcc_run(csv, cfg, tempfile("dcc-out")))
}
Run the code above in your browser using DataLab