From 7604cd25cee4b0b59ac6fd88ec8c71d7b000bdc1 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Tue, 19 Sep 2023 14:53:43 +0200 Subject: [PATCH] donturn -> donttest https://github.com/easystats/easystats/issues/380 --- R/check_if_installed.R | 2 +- R/clean_parameters.R | 2 +- R/export_table.R | 2 +- R/find_algorithm.R | 2 +- R/get_priors.R | 2 +- R/get_variances.R | 2 +- R/is_converged.R | 2 +- R/is_multivariate.R | 2 +- R/print_parameters.R | 2 +- man/check_if_installed.Rd | 2 +- man/clean_parameters.Rd | 2 +- man/export_table.Rd | 2 +- man/find_algorithm.Rd | 2 +- man/get_priors.Rd | 2 +- man/get_variance.Rd | 2 +- man/is_converged.Rd | 2 +- man/is_multivariate.Rd | 2 +- man/print_parameters.Rd | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/R/check_if_installed.R b/R/check_if_installed.R index e264a949a..daba9e3e0 100644 --- a/R/check_if_installed.R +++ b/R/check_if_installed.R @@ -26,7 +26,7 @@ #' returned, indicating which of the packages are installed, and which not. #' #' @examplesIf interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true") -#' \dontrun{ +#' \donttest{ #' check_if_installed("insight") #' try(check_if_installed("datawizard", stop = FALSE)) #' try(check_if_installed("rstanarm", stop = FALSE)) diff --git a/R/clean_parameters.R b/R/clean_parameters.R index 1a63aa010..c267af290 100644 --- a/R/clean_parameters.R +++ b/R/clean_parameters.R @@ -36,7 +36,7 @@ #' or spline-terms). #' #' @examplesIf require("curl", quietly = TRUE) && curl::has_internet() -#' \dontrun{ +#' \donttest{ #' library(brms) #' model <- download_model("brms_zi_2") #' clean_parameters(model) diff --git a/R/export_table.R b/R/export_table.R index 6190b9d2c..8d5f78354 100644 --- a/R/export_table.R +++ b/R/export_table.R @@ -68,7 +68,7 @@ #' # split longer tables #' export_table(head(iris), table_width = 30) #' -#' \dontrun{ +#' \donttest{ #' # colored footers #' data(iris) #' x <- as.data.frame(iris[1:5, ]) diff --git a/R/find_algorithm.R b/R/find_algorithm.R index bd841bab9..ab9e995da 100644 --- a/R/find_algorithm.R +++ b/R/find_algorithm.R @@ -30,7 +30,7 @@ #' find_algorithm(m) #' #' @examplesIf require("rstanarm") && require("lme4") -#' \dontrun{ +#' \donttest{ #' data(sleepstudy, package = "lme4") #' m <- suppressWarnings(rstanarm::stan_lmer( #' Reaction ~ Days + (1 | Subject), diff --git a/R/get_priors.R b/R/get_priors.R index e602b966f..5c9c6627c 100644 --- a/R/get_priors.R +++ b/R/get_priors.R @@ -12,7 +12,7 @@ #' for the parameters in a given model. #' #' @examples -#' \dontrun{ +#' \donttest{ #' library(rstanarm) #' model <- stan_glm(Sepal.Width ~ Species * Petal.Length, data = iris) #' get_priors(model) diff --git a/R/get_variances.R b/R/get_variances.R index 6ce91b876..a7badbc10 100644 --- a/R/get_variances.R +++ b/R/get_variances.R @@ -118,7 +118,7 @@ #' Highland Statistics. #' #' @examples -#' \dontrun{ +#' \donttest{ #' library(lme4) #' data(sleepstudy) #' m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy) diff --git a/R/is_converged.R b/R/is_converged.R index 62d83f8d2..e76a54543 100644 --- a/R/is_converged.R +++ b/R/is_converged.R @@ -61,7 +61,7 @@ #' } #' #' @examplesIf getOption("warn") < 2L -#' \dontrun{ +#' \donttest{ #' if (require("glmmTMB")) { #' model <- glmmTMB(Sepal.Length ~ poly(Petal.Width, 4) * poly(Petal.Length, 4) + #' (1 + poly(Petal.Width, 4) | Species), data = iris) diff --git a/R/is_multivariate.R b/R/is_multivariate.R index 5f9691a43..341cddc99 100644 --- a/R/is_multivariate.R +++ b/R/is_multivariate.R @@ -13,7 +13,7 @@ #' is from a multivariate response model. #' #' @examples -#' \dontrun{ +#' \donttest{ #' library(rstanarm) #' data("pbcLong") #' model <- suppressWarnings(stan_mvmer( diff --git a/R/print_parameters.R b/R/print_parameters.R index dfbe24187..065b92133 100644 --- a/R/print_parameters.R +++ b/R/print_parameters.R @@ -81,7 +81,7 @@ #' necessary, also for a cleaner print. See also 'Examples'. #' #' @examplesIf require("curl", quietly = TRUE) && curl::has_internet() -#' \dontrun{ +#' \donttest{ #' library(bayestestR) #' model <- download_model("brms_zi_2") #' x <- hdi(model, effects = "all", component = "all") diff --git a/man/check_if_installed.Rd b/man/check_if_installed.Rd index 9a8fc4ac4..f4a1ad03f 100644 --- a/man/check_if_installed.Rd +++ b/man/check_if_installed.Rd @@ -52,7 +52,7 @@ Checking if needed package is installed } \examples{ \dontshow{if (interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -\dontrun{ +\donttest{ check_if_installed("insight") try(check_if_installed("datawizard", stop = FALSE)) try(check_if_installed("rstanarm", stop = FALSE)) diff --git a/man/clean_parameters.Rd b/man/clean_parameters.Rd index 5e1a08eb5..d73284425 100644 --- a/man/clean_parameters.Rd +++ b/man/clean_parameters.Rd @@ -43,7 +43,7 @@ or spline-terms). } \examples{ \dontshow{if (require("curl", quietly = TRUE) && curl::has_internet()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -\dontrun{ +\donttest{ library(brms) model <- download_model("brms_zi_2") clean_parameters(model) diff --git a/man/export_table.Rd b/man/export_table.Rd index fe8f30675..b62d7fbf7 100644 --- a/man/export_table.Rd +++ b/man/export_table.Rd @@ -129,7 +129,7 @@ export_table(head(iris), sep = " ", header = "*", digits = 1) # split longer tables export_table(head(iris), table_width = 30) -\dontrun{ +\donttest{ # colored footers data(iris) x <- as.data.frame(iris[1:5, ]) diff --git a/man/find_algorithm.Rd b/man/find_algorithm.Rd index cf027eae9..8c02d71bb 100644 --- a/man/find_algorithm.Rd +++ b/man/find_algorithm.Rd @@ -47,7 +47,7 @@ m <- lme4::lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy) find_algorithm(m) \dontshow{\}) # examplesIf} \dontshow{if (require("rstanarm") && require("lme4")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -\dontrun{ +\donttest{ data(sleepstudy, package = "lme4") m <- suppressWarnings(rstanarm::stan_lmer( Reaction ~ Days + (1 | Subject), diff --git a/man/get_priors.Rd b/man/get_priors.Rd index 947d335c3..0b3c9a74e 100644 --- a/man/get_priors.Rd +++ b/man/get_priors.Rd @@ -25,7 +25,7 @@ Provides a summary of the prior distributions used for the parameters in a given model. } \examples{ -\dontrun{ +\donttest{ library(rstanarm) model <- stan_glm(Sepal.Width ~ Species * Petal.Length, data = iris) get_priors(model) diff --git a/man/get_variance.Rd b/man/get_variance.Rd index ac2329332..762a0baaa 100644 --- a/man/get_variance.Rd +++ b/man/get_variance.Rd @@ -148,7 +148,7 @@ from \pkg{blme}), \code{clmm}, \code{cpglmm}, \code{glmmadmb}, \code{glmmTMB}, is experimental and may not work for all models. } \examples{ -\dontrun{ +\donttest{ library(lme4) data(sleepstudy) m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy) diff --git a/man/is_converged.Rd b/man/is_converged.Rd index 44519cdf6..be3aa9fa7 100644 --- a/man/is_converged.Rd +++ b/man/is_converged.Rd @@ -72,7 +72,7 @@ if (require("lme4")) { } \dontshow{if (getOption("warn") < 2L) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -\dontrun{ +\donttest{ if (require("glmmTMB")) { model <- glmmTMB(Sepal.Length ~ poly(Petal.Width, 4) * poly(Petal.Length, 4) + (1 + poly(Petal.Width, 4) | Species), data = iris) diff --git a/man/is_multivariate.Rd b/man/is_multivariate.Rd index ed8733411..5d49d9fc2 100644 --- a/man/is_multivariate.Rd +++ b/man/is_multivariate.Rd @@ -20,7 +20,7 @@ Small helper that checks if a model is a multivariate response model, i.e. a model with multiple outcomes. } \examples{ -\dontrun{ +\donttest{ library(rstanarm) data("pbcLong") model <- suppressWarnings(stan_mvmer( diff --git a/man/print_parameters.Rd b/man/print_parameters.Rd index 7250a3999..05646de1b 100644 --- a/man/print_parameters.Rd +++ b/man/print_parameters.Rd @@ -104,7 +104,7 @@ necessary, also for a cleaner print. See also 'Examples'. } \examples{ \dontshow{if (require("curl", quietly = TRUE) && curl::has_internet()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -\dontrun{ +\donttest{ library(bayestestR) model <- download_model("brms_zi_2") x <- hdi(model, effects = "all", component = "all")