compute_dtf {admiral}R Documentation

Derive the Date Imputation Flag

Description

Derive the date imputation flag ('--DTF') comparing a date character vector ('--DTC') with a Date vector ('--DT').

Usage

compute_dtf(dtc, dt)

Arguments

dtc

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

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

dt

The Date vector to compare.

A date object is expected.

Details

Usually this computation function can not be used with ⁠%>%⁠.

Value

The date imputation flag ('--DTF') (character value of 'D', 'M' , 'Y' or NA)

Author(s)

Samia Kabi

See Also

Date/Time Computation Functions that returns a vector: compute_duration(), compute_tmf(), convert_date_to_dtm(), convert_dtc_to_dtm(), convert_dtc_to_dt(), impute_dtc_dtm(), impute_dtc_dt()

Examples

compute_dtf(dtc = "2019-07", dt = as.Date("2019-07-18"))
compute_dtf(dtc = "2019", dt = as.Date("2019-07-18"))

[Package admiral version 0.8.4 Index]