Skip to contents

Reads files downloaded by download.TD.data

Usage

read.TD.files(
  dl.folder = "TD Files",
  cols.to.import = c(1, 2, 4),
  col.names = c("ref.date", "yield.bid", "price.bid")
)

Arguments

dl.folder

Folder with excel files from tesouro direto

cols.to.import

Columns (numeric) to import from excel files (open and check the columns of the excel file from tesouro direto for details)

col.names

Names of columns in final data.frame (same size as cols.to.import)

Value

A dataframe with the data

Examples

# Downloads data from tesouro direto (only 1 file for simplicity)

dl.folder ='TD Files'

if (FALSE) {
download.TD.data(dl.folder = dl.folder, n.dl = 1)

my.df <- read.TD.files(dl.folder = dl.folder)
}