From 5198578c35de4269828503075a69496895e162dd Mon Sep 17 00:00:00 2001 From: "Mattan S. Ben-Shachar" Date: Sun, 23 Jul 2023 14:02:13 +0300 Subject: [PATCH] add example --- R/plot.check_normality.R | 4 ++++ man/plot.see_check_normality.Rd | 3 +++ 2 files changed, 7 insertions(+) diff --git a/R/plot.check_normality.R b/R/plot.check_normality.R index b5f7759b7..63637c279 100644 --- a/R/plot.check_normality.R +++ b/R/plot.check_normality.R @@ -26,6 +26,10 @@ #' m <<- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) #' result <- check_normality(m) #' plot(result) +#' +#' @examplesIf require("performance") && require("qqplotr") +#' plot(result, type = "qq", detrend = TRUE) +#' #' @export plot.see_check_normality <- function(x, type = c("density", "qq", "pp"), diff --git a/man/plot.see_check_normality.Rd b/man/plot.see_check_normality.Rd index ac77c2271..a90c37454 100644 --- a/man/plot.see_check_normality.Rd +++ b/man/plot.see_check_normality.Rd @@ -60,6 +60,9 @@ m <<- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) result <- check_normality(m) plot(result) \dontshow{\}) # examplesIf} +\dontshow{if (require("performance") && require("qqplotr")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +plot(result, type = "qq", detrend = TRUE) +\dontshow{\}) # examplesIf} } \seealso{ See also the vignette about \href{https://easystats.github.io/performance/articles/check_model.html}{\code{check_model()}}.