# Minimal reproducible example
data0 <- data.frame(
record_id = c("100-1", "100-2", "200-1"),
redcap_event_name = c("baseline_arm_1", "baseline_arm_1", "follow_up_arm_1"),
redcap_event_name.factor = factor(c("Baseline", "Baseline", "Follow-up")),
stringsAsFactors = FALSE
)
# Suppose we want to check that every record has the follow-up event
res <- rd_event(
data = data0,
dic = data.frame(), # placeholder dictionary
event = "follow_up_arm_1",
report_zeros = TRUE
)
# Records missing the event:
res$queries
# HTML summary (in RMarkdown or Viewer)
res$results
Run the code above in your browser using DataLab