diff --git a/R/plot.parameters_model.R b/R/plot.parameters_model.R index 0b4ec0fe1..7cbba6ecb 100644 --- a/R/plot.parameters_model.R +++ b/R/plot.parameters_model.R @@ -513,7 +513,9 @@ plot.see_parameters_model <- function(x, } else if (has_response) { p <- p + facet_wrap(~Response, ncol = n_columns, scales = facet_scales) } else if (has_subgroups) { - suppressWarnings(p <- p + facet_grid(Subgroup ~ ., scales = "free", space = "free")) # nolint + suppressWarnings({ + p <- p + facet_grid(Subgroup ~ ., scales = "free", space = "free") + }) } if (length(model_attributes$parameter_names) > 1L) { diff --git a/R/print.check_model.R b/R/print.check_model.R index 96902c44e..8f684d49f 100644 --- a/R/print.check_model.R +++ b/R/print.check_model.R @@ -9,13 +9,13 @@ print.see_check_model <- function(x, # to plot(), "type" is no longer recognized as "missing()" plot_type <- attr(x, "type") - if (missing(type) && !is.null(plot_type) && plot_type %in% c("density", "discrete_dots", "discrete_interval", "discrete_both")) { + if (missing(type) && !is.null(plot_type) && plot_type %in% c("density", "discrete_dots", "discrete_interval", "discrete_both")) { # nolint type <- plot_type } else { type <- match.arg(type, choices = c("density", "discrete_dots", "discrete_interval", "discrete_both")) } - suppressWarnings(suppressMessages(plot( + suppressWarnings(suppressMessages(graphics::plot( x, style = style, colors = colors, diff --git a/R/utils.R b/R/utils.R index 383a15b34..788b05868 100644 --- a/R/utils.R +++ b/R/utils.R @@ -7,10 +7,12 @@ return(x) } + .as.data.frame_density <- function(x, ...) { data.frame(x = x$x, y = x$y) } + # safe conversion from factor to numeric .factor_to_numeric <- function(x) { if (is.numeric(x)) { @@ -27,11 +29,13 @@ as.numeric(as.character(x)) } + .has_multiple_panels <- function(x) { (!"Effects" %in% names(x) || insight::n_unique(x$Effects) <= 1L) && (!"Component" %in% names(x) || insight::n_unique(x$Component) <= 1L) } + .clean_parameter_names <- function(params, grid = FALSE) { params <- unique(params) labels <- params @@ -90,7 +94,6 @@ } - .fix_facet_names <- function(x) { if ("Component" %in% names(x)) { x$Component <- as.character(x$Component) @@ -117,7 +120,6 @@ } - .intercept_names <- c( "(intercept)_zi",