Information regarding prices and yields of bonds issued by the Brazilian government can be downloaded manually as excel files from the Tesouro Direto website. However, it is painful to aggregate all of this data into something useful as the several files don’t have an uniform format.
GetTDData makes the process of importing data from Tesouro direto much easier. All that you need in order to download the data is the name of the assets (LFT, LTN, NTN-C, NTN-B, NTN-B Principal, NTN-F).
# from CRAN (stable version) install.package('GetTDData') # from github (development version) devtools::install_github('msperlin/GetTDData')
See documentation page at https://msperlin.github.io/GetTDData/.