Skip to contents

Find the time of the first dose

Usage

sdtm_first_dose(x, ...)

# S3 method for list
sdtm_first_dose(x, ...)

# S3 method for data.frame
sdtm_first_dose(
  x,
  trt_value = NULL,
  trt_col = c("EXTRT", "TRT"),
  dtc_col = c("EXSTDTC", "EXDTC", "STDTC", "DTC"),
  ...
)

Arguments

x

The EX domain from SDTM or a list with the EX domain in an element named "EX" that contains the EX domain.

...

Arguments passed to methods.

trt_value

A vector of treatments (from the trt_col) that could be the first dose for a subject.

trt_col

A vector of column names to search for trt_value. Only one of these columns can be in x, and all others are ignored.

dtc_col

The column to search for the dosing time. Only one of these columns can be in x, and all others are ignored.

Value

A data frame with one column for each grouping level as generated by

dplyr::group_by (the USUBJID column is used as the grouping if no groups are present) and one additional column named "DTC_first_dose" containing the date and time of the first dose.