From b75abeba5f6a40acd072e3057054da57060b9d0f Mon Sep 17 00:00:00 2001 From: blind-contours Date: Tue, 3 Oct 2023 19:56:23 -0600 Subject: [PATCH] fixed the data.table indexing passed to impute --- R/process_data.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/process_data.R b/R/process_data.R index d1a31c6c..982d9dae 100644 --- a/R/process_data.R +++ b/R/process_data.R @@ -134,7 +134,8 @@ process_data <- function(data, nodes, column_names, flag = TRUE, nodes$covariates <- c(nodes$covariates, missing_indicator_vars) } # impute covariates - imputed <- impute(data[, missing_covar_cols, with = FALSE]) + data_missing_covars <- data[, missing_covar_cols, with = FALSE] + imputed <- impute(data.frame(data_missing_covars)) # update data set(data, , missing_covar_cols, imputed)