impute_dtc_simplify_time: Confirm that the value looks like a time, and remove fully...

View source: R/impute_dtc.R

impute_dtc_simplify_timeR Documentation

Confirm that the value looks like a time, and remove fully unknown times and zero seconds

Description

A time is a 12- or 24-hour time possibly with "UN" as specified by the CDISC SDTM standard. It may be of the format "" (empty string), #:##, #:##:##, ##:##, ##:##:##, #:##:UN, ##:##:UN, UN:UN, or UN:UN:UN (where # is a valid number only allowing hours from 00-23, and "UN" signifies that the value is unknown).

Usage

impute_dtc_simplify_time(x, drop_zero_seconds = FALSE)

Arguments

x

A character vector that looks like a time (see details)

drop_zero_seconds

Drop :00 for seconds (keeping only hours and minutes)

Value

A character vector that is simplified and is a time. Zero will be prepended to single-digit hours.


billdenney/bsd.report documentation built on Jan. 16, 2024, 12:54 a.m.