tests/testthat/test_BatchGetSymbols.R

library(testthat)
library(BatchGetSymbols)

test_that(desc = 'Test of read function',{

  first.date <- Sys.Date() - 30
  last.date <- Sys.Date()

  my.tickers <- c('MMM')

  l.out <- BatchGetSymbols(tickers = my.tickers,
                           first.date = first.date,
                           last.date = last.date)

  expect_true(nrow(l.out$df.tickers) > 0)
} )

Try the BatchGetSymbols package in your browser

Any scripts or data that you put into this service are public.

BatchGetSymbols documentation built on May 1, 2022, 5:07 p.m.