gdfpd.fix.DFP.dataframes: Fix dataframe for version issues and inflation measures...

Description Usage Arguments Value Examples

View source: R/gdfpd_fix_dataframes.R

Description

Fix dataframe for version issues and inflation measures (internal)

Usage

1
gdfpd.fix.DFP.dataframes(df.in, inflation.index, df.inflation, max.levels = 3)

Arguments

df.in

A dataframe with financial statements

inflation.index

Sets the inflation index to use for finding inflation adjusted values of all reports. Possible values: 'dollar' (default) or 'IPCA', the brazilian main inflation index. When using 'IPCA', the base date is set as the last date found in the DFP dataset.

df.inflation

Dataframe with inflation data

max.levels

Sets the maximum number of levels of accounting items in financial reports (default = 3)

Value

The fixed data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#'
# get example data from RData file
my.f <- system.file('extdata/Example_DFP_Report_Petrobras.RData', package = 'GetDFPData')
load(my.f)

df.assets <- df.reports$fr.assets[[1]]
df.inflation <- gdfpd.get.inflation.data('dollar', do.cache = FALSE)

df.assets.fixed <- gdfpd.fix.DFP.dataframes(df.assets,
                                        inflation.index = 'dollar',
                                        df.inflation = df.inflation)

GetDFPData documentation built on April 1, 2021, 5:07 p.m.