From b28e13866217394ac10637f6ecbe338d682b4a3b Mon Sep 17 00:00:00 2001 From: timelyportfolio Date: Wed, 3 Jul 2019 19:35:44 -0500 Subject: [PATCH] fix mobx example with `is.interactive()` --- R/dependencies.R | 3 +++ man/html_dependency_mobx.Rd | 3 +++ 2 files changed, 6 insertions(+) diff --git a/R/dependencies.R b/R/dependencies.R index 349264f..90d4fa0 100644 --- a/R/dependencies.R +++ b/R/dependencies.R @@ -99,6 +99,8 @@ html_dependency_reacttools <- function(){ #' @export #' #' @examples +#' if(interactive()) { +#' #' library(htmltools) #' library(reactR) #' @@ -120,6 +122,7 @@ html_dependency_reacttools <- function(){ #' )) #' ) #' ) +#' } #' #' \dontrun{ #' # use with react diff --git a/man/html_dependency_mobx.Rd b/man/html_dependency_mobx.Rd index df1276d..8b2196e 100644 --- a/man/html_dependency_mobx.Rd +++ b/man/html_dependency_mobx.Rd @@ -18,6 +18,8 @@ of the dependencies is important, so please add \code{html_dependency_react()} b \code{html_dependency_mobx()}. } \examples{ +if(interactive()) { + library(htmltools) library(reactR) @@ -39,6 +41,7 @@ browsable( )) ) ) +} \dontrun{ # use with react