Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 17, 2024
1 parent 46e7b6c commit ff72739
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/rescale_weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ rescale_weights <- function(data,
insight::format_error("Argument `by` must be specified. Please provide one or more variable names in `by` that indicate the grouping structure (strata) of the survey data (level-2-cluster variable).") # nolint
}

if (!by %in% colnames(data_tmp)) {
insight::format_error("The variable specified in `by` was not found in the data. Maybe misspelled?") # nolint
}

if (nest && length(by) < 2) {
insight::format_warning(
sprintf(
Expand Down

0 comments on commit ff72739

Please sign in to comment.