diff --git a/R/process_data.R b/R/process_data.R index 11ce6e7d..f7e7e643 100644 --- a/R/process_data.R +++ b/R/process_data.R @@ -115,19 +115,20 @@ process_data <- function( } } # Warn user when group not indexed in data - if (!is.null(group) && group %notin% index_variables) { - if (group != "none") { - cli::cli_alert_warning("{group} not an index of data.") - # reset group to NULL so it's not added to grouping incorrectly - group <- NULL - } - } + # if (!is.null(group) && group %notin% index_variables) { + # if (group != "none") { + # cli::cli_alert_warning("{group} not an index of data.") + # # reset group to NULL so it's not added to grouping incorrectly + # group <- NULL + # } + # } # Set group_var to identified grouping if (!is.null(group) && group != "none") { data <- dplyr::mutate( dat, group_var = .data[[group]] ) + if (group %notin% index_variables) index_variables <- c(group, index_variables) } else { data <- dat }