R Under development (unstable) (2023-06-13 r84537 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > 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.21 0.09 0.29