Merge time-varying covariate columns into a NM-style data.frame using LOCF
(with LOCB for records before the first source). Subjects/records still NA
after LOCF/LOCB can be filled with the column-wise median of cov_df.
merge_cov_locf(
nm,
cov_df,
value_cols,
time_col,
median_fb = TRUE,
verbose = FALSE,
subj_col = "SUBJID",
dat_col = "DAT2",
tim_col = "TIME"
)nm with value_cols added.
data.frame with key columns subj_col, dat_col,
tim_col.
data.frame with subj_col, time_col, and one or
more value columns.
character vector of value columns in cov_df to
bring into nm.
name of the time column in cov_df, parsed by
parse_dtc.
logical. If TRUE (default), fill remaining NA values with
the column-wise median of cov_df.
logical. Print median fill counts. Default FALSE.
subject ID column name. Default "SUBJID".
date column name in nm. Default "DAT2".
time column name in nm. Default "TIME".