R Under development (unstable) (2024-02-12 r85894 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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") > > # 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.21 0.07 0.29