diff --git a/R/rescale_weights.R b/R/rescale_weights.R index 59b8d43b6..be7487f3b 100644 --- a/R/rescale_weights.R +++ b/R/rescale_weights.R @@ -209,7 +209,7 @@ rescale_weights <- function(data, ), .misspelled_string(colnames(data_tmp), dont_exist, "Possibly misspelled?") ) - } else { + } else if (is.null(by)) { # if `by` = NULL, we create a dummy group by <- "tmp_kish_by" data_tmp[[by]] <- 1