R/check_multiple_indep.R

Defines functions check_multiple_indep

check_multiple_indep <-
  function(data, indep,
           call = rlang::caller_env()) {

    indep_call <- rlang::expr_deparse(rlang::enquo(indep))

    if(ncol(dplyr::select(.data = data, {{indep}})) > 1L) {
      cli::cli_abort(c("Too many columns provided for {.arg indep}.",
                       x = "Only 1 indep-column is currently allowed.",
                       i = "You provided indep = {indep_call}"), call = call)
    }
  }

Try the saros package in your browser

Any scripts or data that you put into this service are public.

saros documentation built on June 8, 2025, 10:43 a.m.