diff --git a/R/pareto_smooth.R b/R/pareto_smooth.R index 52ec6bb..4593ce9 100644 --- a/R/pareto_smooth.R +++ b/R/pareto_smooth.R @@ -259,8 +259,8 @@ pareto_smooth.default <- function(x, are_log_weights = FALSE, ...) { - checkmate::expect_numeric(ndraws_tail, null.ok = TRUE) - checkmate::expect_numeric(r_eff, null.ok = TRUE) + checkmate::assert_numeric(ndraws_tail, null.ok = TRUE) + checkmate::assert_numeric(r_eff, null.ok = TRUE) extra_diags <- as_one_logical(extra_diags) return_k <- as_one_logical(return_k) verbose <- as_one_logical(verbose) diff --git a/R/weight_draws.R b/R/weight_draws.R index 3449482..fa8bfd8 100644 --- a/R/weight_draws.R +++ b/R/weight_draws.R @@ -179,8 +179,8 @@ weights.draws <- function(object, log = FALSE, normalize = TRUE, ...) { # validate weights and return log weights validate_weights <- function(weights, draws, log = FALSE) { - checkmate::expect_numeric(weights) - checkmate::expect_flag(log) + checkmate::assert_numeric(weights) + checkmate::assert_flag(log) if (length(weights) != ndraws(draws)) { stop_no_call("Number of weights must match the number of draws.") }