rf <- tempfile(fileext = ".yaml")
writeLines(c("checks:", " - id: R001", " type: range",
" variable: score", " min: 0", " max: 100"), rf)
df <- data.frame(sid = c("S1", "S2"), score = c(50, 70))
if (requireNamespace("yaml", quietly = TRUE)) {
dcc_doctor(df, dcc_rules(rf), id_var = "sid")
}
Run the code above in your browser using DataLab