fry9c: Class providing an object to manipulate a FR Y-9c and...

Description Usage Arguments Format Value Fields Methods Examples

Description

Class providing an object to manipulate a FR Y-9c and component schedules

Usage

1
2
3
.fry9c

Fry9c(date, omb_number, title)

Arguments

date

The date associated with the FR Y-9c

omb_number

The OMB number of the FR Y-9c documentation. Something like "7100-0128"

title

The title of the FR Y-9c. Something like "Consolidated Financial Statements for Holding Companies–FR Y-9c"

Format

R6Class object.

Value

Object of R6Class

an object of class fry9c

Fields

date

The date associated with the FR Y-9c

omb_number

The OMB number of the FR Y-9c documentation. Something like "7100-0128"

title

The title of the FR Y-9c. Something like "Consolidated Financial Statements for Holding Companies–FR Y-9c"

desig

An identifier for a component schedule

dat

A dataset from the Fed with all FR Y-9c data for a quarter. The dataset contains columns with names that correspond to keys

bank_names

a vector of bank names to be stored in the schedule

output_file_name

the output filename for the Excel file

Methods

Documentation
new(date, omb_number, title)

A generator for the fry9c class

add(sched)

add a new schedule

getSchedule(desig)

Get a schedule by the desig

initializeData(dat)

initialize the values in each schedule and component

print()

print the schedules and components as a string

addBankNames(bank_names)

add bank_names to this object

exportExcel(output_file_name)

export an Excel file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
f <- Fry9c("20180331", "7100-0128",
           "Consolidated Financial Statements for Holding Companies--FR Y-9c")
x <- Schedule("HI", "Income Statement")
y <- Component("1.a.", "Income", "ZZZZ1234")
y$add(Component("1.a.(1)", "Sub-Income", "ABCD5555"))
x$add(y)
f$add(x)
f$initializeData(data.frame(ZZZZ1234 = 1:4,
                            ABCD5555 = 5:8))
print(f)
f$getSchedule("HI")$getDesig() == "HI"
f$addBankNames(paste("bank", LETTERS[1:4], sep=""))
## Not run: 
  f$exportExcel(tempfile(fileext = ".xlsx"))

## End(Not run)

bertcarnell/fry9c documentation built on May 13, 2019, 5:22 p.m.