Code
impute_dtc_dt(input, min_dates = list(c(ymd("2019-07-06")), c(ymd("2019-06-06"))),
highest_imputation = "Y", date_imputation = "first")
Condition
Error in `restrict_imputed_dtc_dt()`:
! Length of `min_dates` do not match length of dates to be imputed.
Code
impute_dtc_dt(input, max_dates = list(c(ymd("2019-07-06")), c(ymd("2019-06-06"))),
highest_imputation = "Y", date_imputation = "last")
Condition
Error in `restrict_imputed_dtc_dt()`:
! Length of `max_dates` do not match length of dates to be imputed.
Code
data.frame(AESTDTC = c(NA_character_, NA_character_), TRTSDT = c(ymd(
"2022-01-01"), NA)) %>% mutate(AESTDTC = as.character(AESTDTC)) %>%
derive_vars_dt(dtc = AESTDTC, new_vars_prefix = "AST", highest_imputation = "Y",
date_imputation = "first", flag_imputation = "auto", max_dates = exprs(
TRTSDT))
Condition
Warning:
If `highest_impuation = "Y"` and `date_imputation = "first"` is specified, `min_dates` should be specified.
Output
AESTDTC TRTSDT ASTDT ASTDTF
1 <NA> 2022-01-01 <NA> <NA>
2 <NA> <NA> <NA> <NA>
Code
data.frame(AESTDTC = c(NA_character_, NA_character_), TRTSDT = c(ymd(
"2022-01-01"), NA)) %>% mutate(AESTDTC = as.character(AESTDTC)) %>%
derive_vars_dt(dtc = AESTDTC, new_vars_prefix = "AST", highest_imputation = "Y",
date_imputation = "last", flag_imputation = "auto", min_dates = exprs(
TRTSDT))
Condition
Warning:
If `highest_impuation = "Y"` and `date_imputation = "last"` is specified, `max_dates` should be specified.
Output
AESTDTC TRTSDT ASTDT ASTDTF
1 <NA> 2022-01-01 <NA> <NA>
2 <NA> <NA> <NA> <NA>
Code
data.frame(AESTDTC = c(NA_character_, NA_character_), TRTSDT = c(ymd(
"2022-01-01"), NA)) %>% mutate(AESTDTC = as.character(AESTDTC)) %>%
derive_vars_dt(dtc = AESTDTC, new_vars_prefix = "AST", highest_imputation = "Y",
date_imputation = "first", flag_imputation = "auto")
Condition
Error in `derive_vars_dt()`:
! If `highest_impuation = "Y"` is specified, `min_dates` or `max_dates` must be specified respectively.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.