Skip to contents

Standardize the SDTM ID columns (STUDYID, USUBJID, and SUBJID)

Usage

standardize_sdtm_id(
  data,
  id,
  studyid,
  sep_usubjid = "-",
  allow_missing_id = FALSE
)

Arguments

data

data.frame or similar to have standard IDs added

id

a data.frame or list of data.frames to merge other identifiers into the data

studyid

a character scalar indicating the study number

sep_usubjid

a character scalar separating the STUDYID from the SUBJID

allow_missing_id

Is it acceptable for some USUBJID and SUBJID to be missing?

Value

A data.frame with columns for STUDYID, USUBJID, and SUBJID and other identifier columns removed.