get_fre_data: Downloads and reads FRE datasets

View source: R/fct_get_fre_data.R

get_fre_dataR Documentation

Downloads and reads FRE datasets

Description

The FRE (formularios de referencia) is the reporting system of companies traded at B3. This function will access the CVM ftp and parse all available files according to user choices such as dates and companies.

Usage

get_fre_data(
  companies_cvm_codes = NULL,
  first_year = lubridate::year(Sys.Date()) - 2,
  last_year = lubridate::year(Sys.Date()),
  fre_to_read = "last",
  cache_folder = "gfred_cache"
)

Arguments

companies_cvm_codes

Numeric CVM code of companies. IF set to NULL (default), will return data for all available companies.

first_year

First year of selected data

last_year

Last year of selected data

fre_to_read

Whether to read 'first', 'last' or 'all' fre docs ('last' is default). Be aware that companies do release several FRE docs for a single year.

cache_folder

Path of cache folder to keep cache and zip files

Value

A list of tibbles, where each element is a different table from the FRE system

Examples

## Not run: 
l_fre <- get_fre_data(18627)

## End(Not run)

GetFREData documentation built on June 13, 2022, 5:08 p.m.