Running 'test_Defaults.R' [1s]
  Running 'test_getDividends.R' [157s]
  Running 'test_getSplits.R' [168s]
  Running 'test_getSymbols.R' [154s]
  Running 'tests.R' [0s]
Running the tests in 'tests/test_getDividends.R' failed.
Complete output:
  > library(quantmod)
  Loading required package: xts
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: TTR
  Registered S3 method overwritten by 'quantmod':
    method            from
    as.zoo.data.frame zoo 
  > 
  > test.web.endpoints <- Sys.getenv("QUANTMOD_TEST_WEB_ENDPOINTS")
  > 
  > # split-adjusted by default
  > #if (nzchar(test.web.endpoints)) {
  > if (FALSE) {
  +   cf.div.adj <- as.numeric(getDividends("CF")["2015"])
  +   stopifnot(isTRUE(all.equal(cf.div.adj, rep(0.3, 4))))
  +   cf.div.raw <- as.numeric(getDividends("CF", split.adjust = FALSE)["2015"])
  +   stopifnot(isTRUE(all.equal(cf.div.raw, c(1.5, 1.5, 0.3, 0.3))))
  + }
  > 
  > proc.time()
     user  system elapsed 
     0.26    0.07    0.32 
Running the tests in 'tests/test_getSplits.R' failed.
Complete output:
  > library(quantmod)
  Loading required package: xts
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: TTR
  Registered S3 method overwritten by 'quantmod':
    method            from
    as.zoo.data.frame zoo 
  > 
  > test.web.endpoints <- Sys.getenv("QUANTMOD_TEST_WEB_ENDPOINTS")
  > 
  > # Ensure getSplits() returns the expected ratio
  > if (nzchar(test.web.endpoints)) {
  +   aapl.spl <- as.numeric(getSplits("AAPL")["/2018"])
  +   expected <- c(0.5, 0.5, 0.5, 1/7)
  +   stopifnot(isTRUE(all.equal(aapl.spl, expected)))
  + }
  > 
  > proc.time()
     user  system elapsed 
     0.35    0.10    0.45 
Running the tests in 'tests/test_getSymbols.R' failed.
Complete output:
  > library(quantmod)
  Loading required package: xts
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: TTR
  Registered S3 method overwritten by 'quantmod':
    method            from
    as.zoo.data.frame zoo 
  > 
  > # Tests for getSymbols
  > test.web.endpoints <- Sys.getenv("QUANTMOD_TEST_WEB_ENDPOINTS")
  > 
  > if (nzchar(test.web.endpoints)) {
  +   # Checks for Alpha Vantage
  +   apikey <- Sys.getenv("QUANTMOD_AV_API_KEY")
  +   if (nzchar(apikey)) {
  +     ibm_daily_unadj <- getSymbols("IBM", src = "av", api.key = apikey,
  +       adjusted = FALSE, periodicity = "daily", auto.assign = FALSE)
  +     ibm_daily_adj   <- getSymbols("IBM", src = "av", api.key = apikey,
  +       adjusted = TRUE, periodicity = "daily", auto.assign = FALSE)
  +     stopifnot(has.Ad(ibm_daily_adj))
  + 
  +     Sys.sleep(60) #AV throttles to 5 calls per minute
  + 
  +     ibm_weekly_unadj <- getSymbols("IBM", src = "av", api.key = apikey,
  +       adjusted = FALSE, periodicity = "weekly", auto.assign = FALSE)
  +     ibm_weekly_adj   <- getSymbols("IBM", src = "av", api.key = apikey,
  +       adjusted = TRUE, periodicity = "weekly", auto.assign = FALSE)
  +     stopifnot(has.Ad(ibm_weekly_adj))
  + 
  +     ibm_monthly_unadj <- getSymbols("IBM", src = "av", api.key = apikey,
  +       adjusted = FALSE, periodicity = "monthly", auto.assign = FALSE)
  +     ibm_monthly_adj   <- getSymbols("IBM", src = "av", api.key = apikey,
  +       adjusted = TRUE, periodicity = "monthly", auto.assign = FALSE)
  +     stopifnot(has.Ad(ibm_monthly_adj))
  +   }
  + }
  > 
  > # Checks to ensure caught errors do not prevent other symbols from loading.
  > # Use one symbol that always works (e.g. from disk) and another that fails.
  > data(sample_matrix, package = "xts")
  > IBM <- as.xts(sample_matrix)
  > cn <- c("Open", "High", "Low", "Close")
  > 
  > td <- tempdir()
  > tf <- file.path(td, "IBM.rda")
  > save(IBM, file = tf)
  > tf <- file.path(td, "IBM.csv")
  > write.zoo(IBM, file = tf, sep = ",")
  > rm(IBM)
  > 
  > e <- new.env()
  > 
  > # Test getSymbols() works if only passed one symbol that does not have data.
  > x <- try({
  +   getSymbols("IBM;WYSIWYG", env = e, src = "csv", dir = td, col.names = cn)
  + }, silent = TRUE)
  
  file  WYSIWYG.csv  does not exist  in  D:\temp\RtmpKmm7c5 ....skipping
  > stopifnot(exists("IBM", e))
  > rm(IBM, pos = e)
  > 
  > x <- try({
  +   getSymbols("IBM;WYSIWYG", env = e, src = "rda", dir = td, col.names = cn)
  + }, silent = TRUE)
  
  file  WYSIWYG.rda  does not exist  in  D:\temp\RtmpKmm7c5 ....skipping
  > stopifnot(exists("IBM", e))
  > rm(IBM, pos = e)
  > 
  > if (nzchar(test.web.endpoints)) {
  +   x <- try({
  +     getSymbols("IBM;WYSIWYG", env = e, src = "yahoo")
  +   }, silent = TRUE)
  +   stopifnot(exists("IBM", e))
  +   rm(IBM, pos = e)
  + 
  +   if (nzchar(apikey)) {
  +     x <- try({
  +       getSymbols("IBM;WYSIWYG", env = e, src = "av", api.key = apikey)
  +     }, silent = TRUE)
  +     stopifnot(exists("IBM", e))
  +     rm(IBM, pos = e)
  +   }
  + 
  +   x <- try({
  +     getSymbols("DGS10;WYSIWYG", env = e, src = "FRED")
  +   }, silent = TRUE)
  +   stopifnot(exists("DGS10", e))
  +   rm(DGS10, pos = e)
  + 
  +   x <- try({
  +     getSymbols("EUR/USD;WYS/WYG", env = e, src = "oanda")
  +   }, silent = TRUE)
  +   stopifnot(exists("EURUSD", e))
  +   rm(EURUSD, pos = e)
  + 
  +   # Ensure getSymbols() errors if only passed one symbol that does not have data.
  +   # "csv" and "rda" already skip missing symbols
  +   x <- try({
  +     getSymbols("WYSIWYG", env = e, src = "yahoo")
  +   }, silent = TRUE)
  +   stopifnot(inherits(x, "try-error"))
  + 
  +   x <- try({
  +     getSymbols("WYSIWYG", env = e, src = "FRED")
  +   }, silent = TRUE)
  +   stopifnot(inherits(x, "try-error"))
  + 
  +   if (nzchar(apikey)) {
  +     x <- try({
  +       getSymbols("WYSIWYG", env = e, src = "av", api.key = apikey)
  +     }, silent = TRUE)
  +     stopifnot(inherits(x, "try-error"))
  +   }
  + 
  +   x <- try({
  +     getSymbols("WYS/WYG", env = e, src = "oanda")
  +   }, silent = TRUE)
  +   stopifnot(inherits(x, "try-error"))
  + 
  +   # Individual getSymbols() "methods" should not error if only passed one symbol.
  +   setSymbolLookup(AAPL = "yahoo", DGS10 = "FRED")
  +   getSymbols("AAPL;DGS10", env = e)
  +   stopifnot(exists("AAPL", e))
  +   stopifnot(exists("DGS10", e))
  + }
  > 
  > proc.time()
     user  system elapsed 
     0.48    0.07    0.54