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

fry9cR Documentation

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

Description

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

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

Usage

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"

Value

an object of class fry9c

Methods

Public methods


Method new()

initialize the class

Usage
.fry9c$new(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"


Method add()

add a new schedule

Usage
.fry9c$add(sched)
Arguments
sched

a schedule


Method getSchedule()

Get a schedule by the desig

Usage
.fry9c$getSchedule(desig)
Arguments
desig

An identifier for a component schedule


Method initializeData()

initialize the values in each schedule and component

Usage
.fry9c$initializeData(dat)
Arguments
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


Method print()

print the schedules and components as a string

Usage
.fry9c$print()

Method addBankNames()

add bank_names to this object

Usage
.fry9c$addBankNames(bank_names)
Arguments
bank_names

a vector of bank names to be stored in the schedule


Method exportExcel()

export an Excel file

Usage
.fry9c$exportExcel(output_file_name)
Arguments
output_file_name

output file name


Method getDate()

Get the Date

Usage
.fry9c$getDate()

Method getOmbNumber()

get the OMB number

Usage
.fry9c$getOmbNumber()

Method getTitle()

Get the title

Usage
.fry9c$getTitle()

Method clone()

The objects of this class are cloneable with this method.

Usage
.fry9c$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

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 April 18, 2022, 10:05 p.m.