From ff122ce267ece06ec4dc2604c99f9a6754552535 Mon Sep 17 00:00:00 2001 From: Marvin Wright Date: Thu, 15 Feb 2024 22:36:59 +0100 Subject: [PATCH] only consider colnames in condition --- R/utils.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/utils.R b/R/utils.R index 9e908d55..781d6274 100644 --- a/R/utils.R +++ b/R/utils.R @@ -575,8 +575,8 @@ prep_cond <- function(condition, params, row_mode) { n_row_cond <- nrow(condition) meta <- params$meta cat <- params$cat - cnt_cols <-meta[family != "multinom", variable] - cat_cols <-meta[family == "multinom", variable] + cnt_cols <- intersect(meta[family != "multinom", variable], colnames(condition)) + cat_cols <- intersect(meta[family == "multinom", variable], colnames(condition)) cond <- copy(condition) cond <- setDT(cond)