From 79ea5dea684203bd86b84cc2abc5dec9ff1e34ea Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 24 Oct 2023 12:31:02 +0200 Subject: [PATCH] allow attr --- R/plot.binned_residuals.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/plot.binned_residuals.R b/R/plot.binned_residuals.R index bbbfc8956..2c6aef930 100644 --- a/R/plot.binned_residuals.R +++ b/R/plot.binned_residuals.R @@ -17,6 +17,11 @@ plot.see_binned_residuals <- function(x, # set defaults term <- attr(x, "term", exact = TRUE) + if (is.null(dots[["show_dots"]])) { + show_dots <- isTRUE(attr(x, "show_dots", exact = TRUE)) + } else { + show_dots <- isTRUE(dots[["show_dots"]]) + } if (missing(style) && !is.null(attr(x, "theme"))) { theme_style <- unlist(strsplit(attr(x, "theme"), "::", fixed = TRUE)) @@ -36,7 +41,7 @@ plot.see_binned_residuals <- function(x, } # show or hide dots - may be useful for large models with many observations - if (!isTRUE(dots[["show_dots"]]) && insight::n_unique(x$group) > 1) { + if (!show_dots && insight::n_unique(x$group) > 1) { x$ybar[x$group == "yes"] <- NA x$CI_low[x$group == "yes"] <- NA x$CI_high[x$group == "yes"] <- NA