Skip to content

Commit

Permalink
remove checks from ard_complex and ard_hierachical
Browse files Browse the repository at this point in the history
  • Loading branch information
jtalboys committed Sep 27, 2024
1 parent 40115cc commit a349e34
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions R/ard_complex.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ ard_complex.data.frame <- function(data,
cli::cli_abort(call = get_cli_abort_call())
}

# check factor levels --------------------------------------------------------
check_no_na_factor_levels(data[c(by, strata)])
check_factor_has_levels(data[c(by, strata)])

# calculate statistics -------------------------------------------------------
# first set an option to be used internally within `ard_continuous()`
# to calculate the statistics and pass multiple arguments to the
Expand Down
8 changes: 0 additions & 8 deletions R/ard_hierarchical.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ ard_hierarchical.data.frame <- function(data,
return(dplyr::tibble() |> as_card())
}

# check factor levels --------------------------------------------------------
check_no_na_factor_levels(data[c(variables, by)])
check_factor_has_levels(data[c(variables, by)])

# if denominator doesn't have all by, they need to be added ------------------
if (!is.null(denominator) && is.data.frame(denominator) && !all(by %in% names(denominator))) {
by_vars_not_present <- by |> setdiff(names(denominator))
Expand Down Expand Up @@ -156,10 +152,6 @@ ard_hierarchical_count.data.frame <- function(data,
return(dplyr::tibble() |> as_card())
}

# check factor levels --------------------------------------------------------
check_no_na_factor_levels(data[c(variables, by)])
check_factor_has_levels(data[c(variables, by)])

# add dummy variable for counting --------------------------------------------
data[["...ard_dummy_for_counting..."]] <- 1L

Expand Down

0 comments on commit a349e34

Please sign in to comment.