Nothing
Code
compute_tmf(dtc = c("2020-11-11T11:11:11", "2020-11-11T11:11"), dtm = ymd_hms(c(
"2020-11-11T11:11:11", "2020-11-11T11:11:00")), ignore_seconds_flag = TRUE)
Condition
Error in `compute_tmf()`:
! Seconds detected in data while `ignore_seconds_flag` is invoked
Code
actual_output <- derive_vars_dtm(mutate(input, ASTDTF = c(NA, NA, NA, NA, "D",
"MD", "M")), new_vars_prefix = "AST", dtc = XXSTDTC, highest_imputation = "M",
date_imputation = "first")
Message
The `ASTDTF` variable is already present in the input dataset and will not be re-derived.
Code
(data.frame(AESTDTC = c(NA_character_, NA_character_), TRTSDTM = c(ymd_hms(
"2022-01-01 23:59:59"), NA)) %>% mutate(AESTDTC = as.character(AESTDTC)) %>%
derive_vars_dtm(dtc = AESTDTC, new_vars_prefix = "AST", highest_imputation = "Y",
date_imputation = "first", time_imputation = "first", flag_imputation = "both",
max_dates = exprs(TRTSDTM)))
Condition
Warning:
If `highest_impuation = "Y"` and `date_imputation = "first"` is specified, `min_dates` should be specified.
Output
AESTDTC TRTSDTM ASTDTM ASTDTF ASTTMF
1 <NA> 2022-01-01 23:59:59 <NA> <NA> <NA>
2 <NA> <NA> <NA> <NA> <NA>
Code
data.frame(AESTDTC = c(NA_character_, NA_character_), TRTSDTM = c(ymd_hms(
"2022-01-01 23:59:59"), NA)) %>% mutate(AESTDTC = as.character(AESTDTC)) %>%
derive_vars_dtm(dtc = AESTDTC, new_vars_prefix = "AST", highest_imputation = "Y",
date_imputation = "last", time_imputation = "last", flag_imputation = "both",
min_dates = exprs(TRTSDTM))
Condition
Warning:
If `highest_impuation = "Y"` and `date_imputation = "last"` is specified, `max_dates` should be specified.
Output
AESTDTC TRTSDTM ASTDTM ASTDTF ASTTMF
1 <NA> 2022-01-01 23:59:59 <NA> <NA> <NA>
2 <NA> <NA> <NA> <NA> <NA>
Code
data.frame(AESTDTC = c(NA_character_, NA_character_), TRTSDTM = c(ymd_hms(
"2022-01-01 23:59:59"), NA)) %>% mutate(AESTDTC = as.character(AESTDTC)) %>%
derive_vars_dtm(dtc = AESTDTC, new_vars_prefix = "AST", highest_imputation = "Y",
date_imputation = "first", time_imputation = "first", flag_imputation = "both")
Condition
Error in `derive_vars_dtm()`:
! If `highest_impuation = "Y"` is specified, `min_dates` or `max_dates` must be specified respectively.
Code
derive_vars_dtm(input, new_vars_prefix = "AST", dtc = XXSTDTC,
ignore_seconds_flag = TRUE)
Condition
Error in `derive_vars_dtm()`:
! Seconds detected in data while `ignore_seconds_flag` is invoked
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.