diff --git a/R/plot.check_heteroscedasticity.R b/R/plot.check_heteroscedasticity.R index 4810537b7..9865e0784 100644 --- a/R/plot.check_heteroscedasticity.R +++ b/R/plot.check_heteroscedasticity.R @@ -9,7 +9,7 @@ #' #' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html). #' -#' @examplesIf require("performance") +#' @examples #' m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) #' result <- check_heteroscedasticity(m) #' result diff --git a/R/plot.check_homogeneity.R b/R/plot.check_homogeneity.R index 590be6900..b13404e46 100644 --- a/R/plot.check_homogeneity.R +++ b/R/plot.check_homogeneity.R @@ -7,7 +7,7 @@ #' #' @return A ggplot2-object. #' -#' @examplesIf require("performance") +#' @examples #' model <<- lm(len ~ supp + dose, data = ToothGrowth) #' result <- check_homogeneity(model) #' result diff --git a/R/plot.check_model.R b/R/plot.check_model.R index 5a38379a3..6e1a7328b 100644 --- a/R/plot.check_model.R +++ b/R/plot.check_model.R @@ -11,7 +11,7 @@ #' #' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html). #' -#' @examplesIf require("performance") && require("patchwork") +#' @examplesIf require("patchwork") #' model <- lm(qsec ~ drat + wt, data = mtcars) #' plot(check_model(model)) #' diff --git a/R/plot.check_normality.R b/R/plot.check_normality.R index 6d494420c..00ba2834d 100644 --- a/R/plot.check_normality.R +++ b/R/plot.check_normality.R @@ -26,12 +26,12 @@ #' #' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html). #' -#' @examplesIf require("performance") +#' @examples #' m <<- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) #' result <- check_normality(m) #' plot(result) #' -#' @examplesIf require("performance") && require("qqplotr") +#' @examplesIf require("qqplotr") #' plot(result, type = "qq", detrend = TRUE) #' #' @export diff --git a/R/plot.check_predictions.R b/R/plot.check_predictions.R index 36f1e9913..ebcff0eb3 100644 --- a/R/plot.check_predictions.R +++ b/R/plot.check_predictions.R @@ -55,7 +55,7 @@ data_plot.performance_pp_check <- function(x, type = "density", ...) { #' #' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html). #' -#' @examplesIf require("performance") +#' @examples #' model <- lm(Sepal.Length ~ Species * Petal.Width + Petal.Length, data = iris) #' check_predictions(model) #' diff --git a/R/plot.compare_parameters.R b/R/plot.compare_parameters.R index 99b1ac775..3f9a7159e 100644 --- a/R/plot.compare_parameters.R +++ b/R/plot.compare_parameters.R @@ -14,7 +14,7 @@ #' #' @return A ggplot2-object. #' -#' @examplesIf require("insight") && require("parameters") +#' @examples #' data(iris) #' lm1 <- lm(Sepal.Length ~ Species, data = iris) #' lm2 <- lm(Sepal.Length ~ Species + Petal.Length, data = iris) diff --git a/R/plot.estimate_contrasts.R b/R/plot.estimate_contrasts.R index 2dbfbbfeb..9670f088b 100644 --- a/R/plot.estimate_contrasts.R +++ b/R/plot.estimate_contrasts.R @@ -69,7 +69,7 @@ data_plot.estimate_contrasts <- function(x, data = NULL, ...) { #' #' @return A ggplot2-object. #' -#' @examplesIf require("modelbased") && require("emmeans") +#' @examplesIf require("emmeans") #' \donttest{ #' model <- lm(Sepal.Width ~ Species, data = iris) #' contrasts <- estimate_contrasts(model) diff --git a/R/plot.n_factors.R b/R/plot.n_factors.R index 33ef1bff5..0aea3b013 100644 --- a/R/plot.n_factors.R +++ b/R/plot.n_factors.R @@ -106,7 +106,7 @@ data_plot.n_clusters <- data_plot.n_factors #' #' @return A ggplot2-object. #' -#' @examplesIf require("parameters") && require("nFactors") +#' @examplesIf require("nFactors") #' data(mtcars) #' result <- n_factors(mtcars, type = "PCA") #' result diff --git a/man/plot.see_check_heteroscedasticity.Rd b/man/plot.see_check_heteroscedasticity.Rd index 42d5a3c17..2b7e600b0 100644 --- a/man/plot.see_check_heteroscedasticity.Rd +++ b/man/plot.see_check_heteroscedasticity.Rd @@ -22,12 +22,10 @@ The \code{plot()} method for the \code{performance::check_heteroscedasticity()} function. } \examples{ -\dontshow{if (require("performance")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) result <- check_heteroscedasticity(m) result plot(result, data = m) # data required for pkgdown -\dontshow{\}) # examplesIf} } \seealso{ See also the vignette about \href{https://easystats.github.io/performance/articles/check_model.html}{\code{check_model()}}. diff --git a/man/plot.see_check_homogeneity.Rd b/man/plot.see_check_homogeneity.Rd index 061fb7b8f..08fe3d509 100644 --- a/man/plot.see_check_homogeneity.Rd +++ b/man/plot.see_check_homogeneity.Rd @@ -22,10 +22,9 @@ The \code{plot()} method for the \code{performance::check_homogeneity()} function. } \examples{ -\dontshow{if (require("performance")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} model <<- lm(len ~ supp + dose, data = ToothGrowth) result <- check_homogeneity(model) result plot(result) -\dontshow{\}) # examplesIf} + } diff --git a/man/plot.see_check_model.Rd b/man/plot.see_check_model.Rd index ccae75b1b..50d55abe2 100644 --- a/man/plot.see_check_model.Rd +++ b/man/plot.see_check_model.Rd @@ -38,7 +38,7 @@ The \code{plot()} method for the \code{performance::check_model()} function. Diagnostic plots for regression models. } \examples{ -\dontshow{if (require("performance") && require("patchwork")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (require("patchwork")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} model <- lm(qsec ~ drat + wt, data = mtcars) plot(check_model(model)) \dontshow{\}) # examplesIf} diff --git a/man/plot.see_check_normality.Rd b/man/plot.see_check_normality.Rd index 5e6587dfc..e0bd70e1a 100644 --- a/man/plot.see_check_normality.Rd +++ b/man/plot.see_check_normality.Rd @@ -59,12 +59,11 @@ The \code{plot()} method for the \code{performance::check_normality()} function. } \examples{ -\dontshow{if (require("performance")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} 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} + +\dontshow{if (require("qqplotr")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} plot(result, type = "qq", detrend = TRUE) \dontshow{\}) # examplesIf} } diff --git a/man/plot.see_compare_parameters.Rd b/man/plot.see_compare_parameters.Rd index 5fd9f2c25..900e68406 100644 --- a/man/plot.see_compare_parameters.Rd +++ b/man/plot.see_compare_parameters.Rd @@ -59,12 +59,10 @@ The \code{plot()} method for the \code{parameters::compare_parameters()} function. } \examples{ -\dontshow{if (require("insight") && require("parameters")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} data(iris) lm1 <- lm(Sepal.Length ~ Species, data = iris) lm2 <- lm(Sepal.Length ~ Species + Petal.Length, data = iris) lm3 <- lm(Sepal.Length ~ Species * Petal.Length, data = iris) result <- compare_parameters(lm1, lm2, lm3) plot(result) -\dontshow{\}) # examplesIf} } diff --git a/man/plot.see_estimate_contrasts.Rd b/man/plot.see_estimate_contrasts.Rd index 4c26ed4e6..05f9de8d7 100644 --- a/man/plot.see_estimate_contrasts.Rd +++ b/man/plot.see_estimate_contrasts.Rd @@ -22,7 +22,7 @@ The \code{plot()} method for the \code{modelbased::estimate_contrasts()} function. } \examples{ -\dontshow{if (require("modelbased") && require("emmeans")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (require("emmeans")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} \donttest{ model <- lm(Sepal.Width ~ Species, data = iris) contrasts <- estimate_contrasts(model) diff --git a/man/plot.see_n_factors.Rd b/man/plot.see_n_factors.Rd index 70c82544e..37a8a6c8d 100644 --- a/man/plot.see_n_factors.Rd +++ b/man/plot.see_n_factors.Rd @@ -31,7 +31,7 @@ A ggplot2-object. The \code{plot()} method for the \code{parameters::n_factors()} and \code{parameters::n_clusters()} } \examples{ -\dontshow{if (require("parameters") && require("nFactors")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (require("nFactors")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} data(mtcars) result <- n_factors(mtcars, type = "PCA") result diff --git a/man/print.see_performance_pp_check.Rd b/man/print.see_performance_pp_check.Rd index d3a319d0c..1d286d61e 100644 --- a/man/print.see_performance_pp_check.Rd +++ b/man/print.see_performance_pp_check.Rd @@ -64,7 +64,6 @@ A ggplot2-object. The \code{plot()} method for the \code{performance::check_predictions()} function. } \examples{ -\dontshow{if (require("performance")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} model <- lm(Sepal.Length ~ Species * Petal.Width + Petal.Length, data = iris) check_predictions(model) @@ -78,7 +77,6 @@ model <- glm( ) out <- check_predictions(model) plot(out, type = "discrete_dots") -\dontshow{\}) # examplesIf} } \seealso{ See also the vignette about \href{https://easystats.github.io/performance/articles/check_model.html}{\code{check_model()}}.