add_dates_from_dstr() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add dates from distribution. The function returns Updated dataset (a tibble).
Usage
add_dates_from_dstr(
ds_tb,
bl_start_date_dtm,
bl_end_date_dtm,
duration_args_ls,
duration_fn = stats::rnorm,
date_var_nm_1L_chr = "date_psx",
id_var_nm_1L_chr = "fkClientID",
round_var_nm_1L_chr = "round",
round_bl_val_1L_chr = "Baseline",
origin_1L_chr = "1970-01-01"
)
Arguments
- ds_tb
Dataset (a tibble)
- bl_start_date_dtm
Baseline start date (a date vector)
- bl_end_date_dtm
Baseline end date (a date vector)
- duration_args_ls
Duration arguments (a list)
- duration_fn
Duration (a function), Default: stats::rnorm
- date_var_nm_1L_chr
Date variable name (a character vector of length one), Default: 'date_psx'
- id_var_nm_1L_chr
Identity variable name (a character vector of length one), Default: 'fkClientID'
- round_var_nm_1L_chr
Round variable name (a character vector of length one), Default: 'round'
- round_bl_val_1L_chr
Round baseline value (a character vector of length one), Default: 'Baseline'
- origin_1L_chr
Origin (a character vector of length one), Default: '1970-01-01'