Learn R Programming

sdtmchecks (version 1.0.0)

check_vs_height: Check for missing height values

Description

This check looks for both records where height is missing as well as DM patients with no height records at all

Usage

check_vs_height(VS, DM)

Value

boolean value if check failed or passed with 'msg' attribute if the test failed

Arguments

VS

Vital Signs SDTM dataset with variables USUBJID,VSTEST,VSTESTCD,VSSTRESN,VISIT

DM

Demographics SDTM dataset with variable USUBJID

Author

Sara Bodach

Examples

Run this code

DM <- data.frame(
 STUDYID = 1,
 USUBJID = 1:10
)

VS <- data.frame(
 STUDYID = 1,
 USUBJID = 1:10,
 VSTEST = "HEIGHT",
 VSTESTCD = "HEIGHT",
 VSSTRESN = 1:10,
 VISIT = 1:10
)

check_vs_height(VS,DM)

DM <- data.frame(
 STUDYID = 1,
 USUBJID = 1:11
)

VS$VSSTRESN[1] = NA
VS$VSSTRESN[2] = "NA"
VS$VSSTRESN[3] = ""
VS$VSSTRESN[4] = "."

check_vs_height(VS,DM)


Run the code above in your browser using DataLab