| merge_cov_locf | R Documentation |
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 |
data.frame with key columns |
cov_df |
data.frame with |
value_cols |
character vector of value columns in |
time_col |
name of the time column in |
median_fb |
logical. If TRUE (default), fill remaining NA values with
the column-wise median of |
verbose |
logical. Print median fill counts. Default FALSE. |
subj_col |
subject ID column name. Default "SUBJID". |
dat_col |
date column name in |
tim_col |
time column name in |
nm with value_cols added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.