From e19b1c155b5f25c79f148b01abcc73e8178d6f98 Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Fri, 22 Oct 2021 09:44:16 -0400 Subject: [PATCH] Only run progress examples interactively --- R/source.R | 2 +- man/cpp_source.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/source.R b/R/source.R index 66710f90..0632228d 100644 --- a/R/source.R +++ b/R/source.R @@ -40,7 +40,7 @@ #' #' num_odd(as.integer(c(1:10, 15, 23))) #' -#' if (require("progress")) { +#' if (interactive() && require("progress")) { #' #' cpp_source( #' code = ' diff --git a/man/cpp_source.Rd b/man/cpp_source.Rd index 186e29a7..87164ef5 100644 --- a/man/cpp_source.Rd +++ b/man/cpp_source.Rd @@ -84,7 +84,7 @@ cpp_source( num_odd(as.integer(c(1:10, 15, 23))) -if (require("progress")) { +if (interactive() && require("progress")) { cpp_source( code = '