View source: R/derive_vars_dt_dtm_utils.R
get_imputation_target_time | R Documentation |
Get Time Imputation Targets
get_imputation_target_time(time_imputation)
time_imputation |
The value to impute the time when a timepart is missing. A character value is expected, either as a
|
For time_imputation = "first"
"00"
, "00"
, "00"
are returned.
For time_imputation = "last"
"23"
, "59"
, "59"
are returned.
For time_imputation = "<hh>:<mm>:<ss>"
"<hh>"
, "<mm>"
, "<ss>"
are returned.
A list of character vectors. The elements of the list are named "hour", "minute", "second".
impute_dtc_dtm()
Utilities used for date imputation:
dt_level()
,
dtm_level()
,
get_imputation_target_date()
,
get_partialdatetime()
,
restrict_imputed_dtc_dt()
,
restrict_imputed_dtc_dtm()
# Get imputation target for "first" time
target_first_time <- admiral:::get_imputation_target_time("first")
print(target_first_time)
# Get imputation target for "last" time
target_last_time <- admiral:::get_imputation_target_time("last")
print(target_last_time)
# Get imputation target for custom time imputation "12-34-56"
target_custom_time <- admiral:::get_imputation_target_time("12-34-56")
print(target_custom_time)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.