From dd620c8439c1c3cbe5d92e0c697d8d593ec5a7e0 Mon Sep 17 00:00:00 2001 From: "Mattan S. Ben-Shachar" Date: Fri, 6 Sep 2024 23:09:55 +0300 Subject: [PATCH] Update utils.R --- R/utils.R | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/R/utils.R b/R/utils.R index 876e7debd..e17b5f3f0 100644 --- a/R/utils.R +++ b/R/utils.R @@ -271,3 +271,19 @@ insight::format_error("The `rvar_col` argument must be a single, valid column name.") } + +#' @keywords internal +.clean_distributional <- function (d) { + nm <- format(d) + attributes(d) <- NULL + names(d) <- nm + d +} + +#' @keywords internal +.is_discrete_dist <- function (d) { + inherits(d, c("dist_bernoulli", "dist_binomial", "dist_categorical", + "dist_geometric", "dist_logarithmic", "dist_multinomial", + "dist_negative_binomial", "dist_poisson", + "dist_poisson_inverse_gaussian")) +} \ No newline at end of file