fry9c_group | R Documentation |
Class providing an object to manipulate a group of FR Y-9c templates, typically used to manage FY Y-9c across years
Class providing an object to manipulate a group of FR Y-9c templates, typically used to manage FY Y-9c across years
Fry9c_group(years, quarters) ## S3 method for class 'fry9c_group' length(x, ...)
years |
The years associated with the fry9c objects in the group |
quarters |
The quarters associate with the fry9c objects in the group |
x |
the |
... |
not used |
an object of class fry9c_group
the number of fry9c
objects in the group
new()
Initialize
.fry9c_group$new(years, quarters)
years
The year associated with FR Y-9c in the list
quarters
The quarter associated with each FR Y-9c in the list
parse_fry9c()
Parse a collection of files
which each represent a FR Y-9c schema.
.fry9c_group$parse_fry9c(files)
files
file names
initializeData()
Parse a collection of FR Y-9c data files in data_list
. Also include a vector of banks
that includes the names of the banks associated with the rows as they should appear in output.
.fry9c_group$initializeData(data_list, banks)
data_list
list of data objects
banks
bank names
get_fry9c()
Extract a fry9c
object from the collection associated with a year
and quarter
.fry9c_group$get_fry9c(year, quarter)
year
The year associated with FR Y-9c in the list
quarter
The quarter associated with each FR Y-9c in the list
get_fry9c_list()
Get a FRY-9C list
.fry9c_group$get_fry9c_list(years, quarters)
years
The year associated with FR Y-9c in the list
quarters
The quarter associated with each FR Y-9c in the list
commonSize()
Common side the sched
using the element from the divisor_sched
and divisor_key
. This is usually done by common sizing an income statement with the average assets.
.fry9c_group$commonSize(divisor_sched, divisor_key, sched)
divisor_sched
the schedule of the divisor
divisor_key
the key of the divisor
sched
the schedule
get_plot_data()
Create a data.frame
that can be used for plotting using ggplot2
by selecting a schedule sched
and element number key
.fry9c_group$get_plot_data(sched, key, num = NA)
sched
the schedule
key
the key in the schedule
num
the schedule element
length()
Return the number of fry9c objects in the collection
.fry9c_group$length()
print()
Print a summary of the collection contents
.fry9c_group$print()
clone()
The objects of this class are cloneable with this method.
.fry9c_group$clone(deep = FALSE)
deep
Whether to make a deep clone.
# load example data fry9c_data_list <- list( read.csv(system.file(file.path("extdata", "ex_BHCF1712.csv"), package = "fry9c")), read.csv(system.file(file.path("extdata", "ex_BHCF1812.csv"), package = "fry9c"))) my_fry9c_group <- Fry9c_group(years = c(2017, 2016), quarters = c(4, 4)) my_fry9c_group$parse_fry9c( system.file(file.path("extdata", c("FR_Y-9C20171231.xml", "FR_Y-9C20161231.xml")), package = "fry9c")) my_fry9c_group$initializeData(fry9c_data_list, paste("bank", LETTERS[1:10], sep="")) print(my_fry9c_group) length(my_fry9c_group) == 2 class(my_fry9c_group$get_fry9c(2016, 4))[1] == "fry9c" my_fry9c_group$commonSize("HC-K", "BHCK3368", "HI") # 5. nrow(my_fry9c_group$get_plot_data("HC-K", "BHCK3368")) == 20 # 5.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.