read.TD.files: Reading excel files from Tesouro Direto

View source: R/gtdd_read_TD_files.R

read.TD.filesR Documentation

Reading excel files from Tesouro Direto

Description

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'

## Not run: 
download.TD.data(dl.folder = dl.folder, n.dl = 1)

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

## End(Not run)

GetTDData documentation built on May 31, 2023, 8:06 p.m.