check_ce_missing_month {sdtmchecks} | R Documentation |
Check for clinical events dates with year and day known but month unknown
Description
Check for missing month when clinical events dates (CESTDTC, CEENDTC, CEDTC) have a known year and day
Usage
check_ce_missing_month(CE, preproc = identity, ...)
Arguments
CE |
Clinical Events SDTM dataset with variables USUBJID, CETERM, and at least one of the following date variables: CESTDTC, CEENDTC, CEDTC |
preproc |
An optional company specific preprocessing script |
... |
Other arguments passed to methods |
Value
boolean value if check failed or passed with 'msg' attribute if the test failed
Author(s)
Ryan Marinelli
Examples
CE <- data.frame(
USUBJID = c(1, 2, 3, 4),
CETERM = c("Headache", "Nausea", "Dizziness", "Fever"),
CESTDTC = c("2023---01", "2023-01-15", "2023-02-01", "2023-02-10"),
CEENDTC = c("2023-01-02", "2023---01", "2023-02-02", "2023-02-12"),
CEDTC = c("2023--01", "", "", ""),
CESEV = c("Mild", "Moderate", "Mild", "Severe"),
CESPID = "FORMNAME-R:13/L:13XXXX",
stringsAsFactors=FALSE
)
check_ce_missing_month(CE)
check_ce_missing_month(CE,preproc=roche_derive_rave_row)
CE <- data.frame(
USUBJID = c(1, 2, 3, 4),
CETERM = c("Headache", "Nausea", "Dizziness", "Fever"),
CESTDTC = c("2023-01-01", "2023-01-15", "2023-02-01", "2023-02-10"),
CEENDTC = c("2023-01-02", "2023-01-16", "2023-02-02", "2023-02-12"),
CEENDTC = "",
CESEV = c("Mild", "Moderate", "Mild", "Severe"),
CESPID = "FORMNAME-R:13/L:13XXXX",
stringsAsFactors=FALSE
)
check_ce_missing_month(CE)
CE$CETERM = NULL
check_ce_missing_month(CE)
[Package sdtmchecks version 1.0.0 Index]