Learn R Programming

finstr (version 0.1.2.9000)

merge.statement: Merge two financial statements

Description

Merge two statements from different time periods.

Usage

# S3 method for statement
merge(x, y, replace_na = TRUE, ...)

Arguments

x
statement object
y
statement object
replace_na
(boolean) replace NAs with zeros
...
further arguments passed to or from other methods

Value

statement object

Details

Since statements are basically data.frames the functions are similar. Except:
  • new statement elements are allways union of input elements, if taxonomy changes new and old elements are visible in all periods
  • missing values are set to 0 not to NA as merge would normally do
  • hierarchy is merged from both statements hierarchies
  • rows are treated as duplicated based on endDate and the row of x is allways considered as duplicate (so y should allways be the later statement)