Skip to content

Commit

Permalink
check installed
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmbarrett committed Jan 23, 2024
1 parent bc143d7 commit a89adac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions R/super_partition.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ super_partition <- function(full_data,
.sep = "_",
verbose = TRUE,
progress_bar = TRUE) {
rlang::check_installed(
c("genieclust", "gtools"),
"Required for `super_partition()`"
)
if (isTRUE(progress_bar)) {
rlang::check_installed(
"progress",
"Required for `progress_bar = TRUE`"
)
}

# ensure 0 < threshold < 1
if (0 > threshold | 1 < threshold) stop("Threshold must be between 0 and 1.")

Expand Down

0 comments on commit a89adac

Please sign in to comment.