Description Financial Statements Getting Data to Statement Structure Using Financial Statements Data Author(s) References
finstr provides data structures and functions for financial statement data manipulation
Financial statements data contain many variables (concepts, elements). Several concepts are aggregations of other concepts. Specific aggregations are needed for each purpose of financial statement analysis.
Package finstr provides the necessary data structures and functions to manipulate financial statements data in R.
Convert XBRL (XML files and schemas) to a list of data frames (facts, contexts, roles and hierarchies) with xbrlDoAll function from XBRL-package.
Function xbrl_get_statements
converts the XBRL data list
to statements object. It is a list of
several statement objects (ballance sheets, income and cash
flow statements) which are data frames with elements as columns and periods
as rows.
Information about calculation hierarchy of concepts and their descriptions
is stored as an attribute to the statement object
and can be retrieved by get_elements
.
Function merge.statement
can merge statements from different
periods to a single statement object. The elements and hierarchies are merged to
provide comfortable analysis of data over several periods.
To calculate values with formulas
use calculate
function or use
statement as a data frame with R base functions and packages
like dplyr for manipulating data
frames.
For real data examples see vignettes: browseVignettes("finstr")
Darko Bergant
Maintainer: Darko Bergant <darko.bergant@gmail.com>
http://en.wikipedia.org/wiki/Financial_statement
http://www.xbrl.org
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.