Skip to content

Commit

Permalink
Only run internet examples in interactive sessions
Browse files Browse the repository at this point in the history
The internet fetching examples can take several seconds to run. Only
run them in interactive sessions to avoid long `R CMD check` times.
  • Loading branch information
joshuaulrich committed Sep 20, 2018
1 parent b1c44c6 commit c9ef85f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
11 changes: 6 additions & 5 deletions R/TTR-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ NULL
#'
#' ### Note: you must have a working internet connection
#' ### for the examples below to work!
#' if (interactive()) {
#' # Fetch U.S. symbols from the internet
#' nyseSymbols <- stockSymbols("NYSE")
#'
#' # Fetch U.S. symbols from the internet
#' nyseSymbols <- stockSymbols("NYSE")
#'
#' # Fetch Yahoo! Finance data from the internet
#' ge <- getYahooData("GE", 19990404, 20050607, adjust = FALSE)
#' # Fetch Yahoo! Finance data from the internet
#' ge <- getYahooData("GE", 19990404, 20050607, adjust = FALSE)
#' }
#'
#'@rdname TTR
#'@import xts zoo
Expand Down
6 changes: 4 additions & 2 deletions R/WebData.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@
#'
#' ### Note: you must have a working internet
#' ### connection for these examples to work!
#' ge <- getYahooData("GE", 19990404, 20050607, adjust = FALSE)
#' if (interactive()) {
#' ge <- getYahooData("GE", 19990404, 20050607, adjust = FALSE)
#'
#' nyse.symbols <- stockSymbols("NYSE")
#' nyse.symbols <- stockSymbols("NYSE")
#' }
#'
#'@section Warning:
#'As of TTR 0.23-2, \code{getYahooData} has been patched to work with changes
Expand Down
12 changes: 6 additions & 6 deletions man/TTR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/WebData.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c9ef85f

Please sign in to comment.