diff --git a/DESCRIPTION b/DESCRIPTION index b592a6a4f..4f72b5786 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: bayestestR Title: Understand and Describe Bayesian Models and Posterior Distributions -Version: 0.14.0.6 +Version: 0.14.0.7 Authors@R: c(person(given = "Dominique", family = "Makowski", diff --git a/R/describe_posterior.R b/R/describe_posterior.R index d238c23d9..80085750f 100644 --- a/R/describe_posterior.R +++ b/R/describe_posterior.R @@ -495,9 +495,9 @@ describe_posterior.default <- function(posterior, ...) { # column consist only of missing values, we remove those columns as well remove_columns <- ".rowid" - if (insight::n_unique(out$Effects, na.rm = TRUE) < 2) remove_columns <- c(remove_columns, "Effects") - if (insight::n_unique(out$Component, na.rm = TRUE) < 2) remove_columns <- c(remove_columns, "Component") - if (insight::n_unique(out$Response, na.rm = TRUE) < 2) remove_columns <- c(remove_columns, "Response") + if (insight::n_unique(out$Effects, remove_na = TRUE) < 2) remove_columns <- c(remove_columns, "Effects") + if (insight::n_unique(out$Component, remove_na = TRUE) < 2) remove_columns <- c(remove_columns, "Component") + if (insight::n_unique(out$Response, remove_na = TRUE) < 2) remove_columns <- c(remove_columns, "Response") # Restore columns order out <- datawizard::data_remove(out[order(out$.rowid), ], remove_columns, verbose = FALSE)