check_lb_lbstnrlo_lbstnrhi {sdtmchecks} | R Documentation |
Check for missing lab reference ranges (LBSTNRLO, LBSTNRHI)
Description
This check looks for missing lab reference ranges (LBSTNRLO, LBSTNRHI) in standard units when numeric result in standard unit (LBSTRESN) is not missing and returns a data frame
Usage
check_lb_lbstnrlo_lbstnrhi(DM, LB)
Arguments
DM |
DM SDTM dataset with variable USUBJID, SITEID |
LB |
Lab SDTM dataset with variables USUBJID, LBTEST, LBSTRESN, LBSTNRLO, LBSTNRHI |
Value
boolean value if check failed or passed with 'msg' attribute if the test failed
Author(s)
Lei Zhao
Examples
LB <- data.frame(
USUBJID = "1",
LBTEST = "Albumin",
LBSTRESN = 1:10,
LBSTNRLO = 1:10,
LBSTNRHI = 1:10,
stringsAsFactors=FALSE
)
LB$LBSTNRLO[1]=""
LB$LBSTNRLO[2]="NA"
LB$LBSTNRLO[3]=NA
LB$LBSTNRHI[3]=""
LB$LBSTNRHI[4]="NA"
LB$LBSTNRHI[5]=NA
DM <- data.frame(
USUBJID = "1",
SITEID = "123456",
stringsAsFactors=FALSE
)
check_lb_lbstnrlo_lbstnrhi(DM, LB)
[Package sdtmchecks version 1.0.0 Index]