From 7a269cfa596756dfad0c695af085c845050221f5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 3 Jul 2023 13:14:19 +0200 Subject: [PATCH] examples --- R/weighted_posteriors.R | 4 ++-- man/weighted_posteriors.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/weighted_posteriors.R b/R/weighted_posteriors.R index 861bdae8c..6e6b600df 100644 --- a/R/weighted_posteriors.R +++ b/R/weighted_posteriors.R @@ -40,7 +40,7 @@ #' #' @examples #' \donttest{ -#' if (require("rstanarm") && require("see")) { +#' if (require("rstanarm") && require("see") && interactive()) { #' stan_m0 <- suppressWarnings(stan_glm(extra ~ 1, #' data = sleep, #' family = gaussian(), @@ -72,7 +72,7 @@ #' #' #' ## weighted prediction distributions via data.frames -#' if (require("rstanarm")) { +#' if (require("rstanarm") && interactive()) { #' m0 <- suppressWarnings(stan_glm( #' mpg ~ 1, #' data = mtcars, diff --git a/man/weighted_posteriors.Rd b/man/weighted_posteriors.Rd index d41b480b0..03db583ba 100644 --- a/man/weighted_posteriors.Rd +++ b/man/weighted_posteriors.Rd @@ -109,7 +109,7 @@ frame. } \examples{ \donttest{ -if (require("rstanarm") && require("see")) { +if (require("rstanarm") && require("see") && interactive()) { stan_m0 <- suppressWarnings(stan_glm(extra ~ 1, data = sleep, family = gaussian(), @@ -141,7 +141,7 @@ if (require("BayesFactor")) { ## weighted prediction distributions via data.frames -if (require("rstanarm")) { +if (require("rstanarm") && interactive()) { m0 <- suppressWarnings(stan_glm( mpg ~ 1, data = mtcars,