diff --git a/R/inlineSVG.R b/R/inlineSVG.R index 31510e2..24caa20 100644 --- a/R/inlineSVG.R +++ b/R/inlineSVG.R @@ -1,4 +1,4 @@ -#' Run plotting code and view svg in RStudio Viewer or web broswer. +#' Run plotting code and view svg in RStudio Viewer or web browser. #' #' This is useful primarily for testing. Requires the \code{htmltools} #' package. @@ -8,7 +8,7 @@ #' @keywords internal #' @export #' @examples -#' if (require("htmltools")) { +#' if (interactive() && require("htmltools")) { #' htmlSVG(plot(1:10)) #' htmlSVG(hist(rnorm(100))) #' } diff --git a/man/htmlSVG.Rd b/man/htmlSVG.Rd index f51938e..2dfae06 100644 --- a/man/htmlSVG.Rd +++ b/man/htmlSVG.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/inlineSVG.R \name{htmlSVG} \alias{htmlSVG} -\title{Run plotting code and view svg in RStudio Viewer or web broswer.} +\title{Run plotting code and view svg in RStudio Viewer or web browser.} \usage{ htmlSVG(code, ...) } @@ -16,7 +16,7 @@ This is useful primarily for testing. Requires the \code{htmltools} package. } \examples{ -if (require("htmltools")) { +if (interactive() && require("htmltools")) { htmlSVG(plot(1:10)) htmlSVG(hist(rnorm(100))) }