sdtm_first_dose: Find the time of the first dose

Description Usage Arguments Value

View source: R/first_dose.R

Description

Find the time of the first dose

Usage

1
2
3
4
5
6
7
8
9
sdtm_first_dose(x, ...)

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

## S3 method for class '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.


billdenney/Rsdtm documentation built on Aug. 14, 2018, 4:31 a.m.