diff --git a/R/methods_aov.R b/R/methods_aov.R index 8028879cd..23bf32c85 100644 --- a/R/methods_aov.R +++ b/R/methods_aov.R @@ -79,9 +79,11 @@ #' model <- aov(Sepal.Length ~ Sepal.Big + Error(Species), data = df) #' model_parameters(model) #' -#' @examplesIf requireNamespace("lme4", quietly = TRUE) +#' @examplesIf requireNamespace("lme4", quietly = TRUE) && requireNamespace("effectsize", quietly = TRUE) #' \donttest{ -#' mm <- lmer(Sepal.Length ~ Sepal.Big + Petal.Width + (1 | Species), data = df) +#' df <- iris +#' df$Sepal.Big <- ifelse(df$Sepal.Width >= 3, "Yes", "No") +#' mm <- lme4::lmer(Sepal.Length ~ Sepal.Big + Petal.Width + (1 | Species), data = df) #' model <- anova(mm) #' #' # simple parameters table diff --git a/man/model_parameters.aov.Rd b/man/model_parameters.aov.Rd index d2f76479f..a4e8fec13 100644 --- a/man/model_parameters.aov.Rd +++ b/man/model_parameters.aov.Rd @@ -276,9 +276,11 @@ model_parameters( model <- aov(Sepal.Length ~ Sepal.Big + Error(Species), data = df) model_parameters(model) \dontshow{\}) # examplesIf} -\dontshow{if (requireNamespace("lme4", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (requireNamespace("lme4", quietly = TRUE) && requireNamespace("effectsize", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} \donttest{ -mm <- lmer(Sepal.Length ~ Sepal.Big + Petal.Width + (1 | Species), data = df) +df <- iris +df$Sepal.Big <- ifelse(df$Sepal.Width >= 3, "Yes", "No") +mm <- lme4::lmer(Sepal.Length ~ Sepal.Big + Petal.Width + (1 | Species), data = df) model <- anova(mm) # simple parameters table