compute_tmf: Derive the Time Imputation Flag

Description Usage Arguments Value Author(s) Examples

View source: R/derive_date_vars.R

Description

Derive the time imputation flag ('--TMF') comparing a date character vector ('--DTC') with a Datetime vector ('--DTM').

Usage

1
compute_tmf(dtc, dtm, ignore_seconds_flag = FALSE)

Arguments

dtc

The date character vector ('--DTC').

A character date is expected in a format like yyyy-mm-ddThh:mm:ss (partial or complete).

dtm

The Date vector to compare ('--DTM').

A datetime object is expected.

ignore_seconds_flag

ADaM IG states that given SDTM ('--DTC') variable, if only hours and minutes are ever collected, and seconds are imputed in ('--DTM') as 00, then it is not necessary to set ('--TMF') to 'S'. A user can set this to TRUE so the 'S' Flag is dropped from ('--TMF').

A logical value

Default: FALSE

Value

The time imputation flag ('--TMF') (character value of 'H', 'M' , 'S' or NA)

Author(s)

Samia Kabi

Examples

1
2
3
compute_tmf(dtc = "2019-07-18T15:25", dtm = as.POSIXct("2019-07-18T15:25:00"))
compute_tmf(dtc = "2019-07-18T15", dtm = as.POSIXct("2019-07-18T15:25:00"))
compute_tmf(dtc = "2019-07-18", dtm = as.POSIXct("2019-07-18"))

epijim/admiral documentation built on Feb. 13, 2022, 12:15 a.m.