get_bank_ids: Get bank IDs for target banks

Description Usage Arguments Value Examples

Description

Get bank IDs for target banks

Usage

1
2
get_bank_ids(bank_names, bank_meta_data, entity_type = "FHD",
  most_recent = TRUE)

Arguments

bank_names

The names of the banks to be selected from the bank_meta_data

bank_meta_data

a data.frame with columns for ID_RSSID, Entity_Type, Name

entity_type

The target entity type (Default: "FHD"). NA indicates the entity_type is not used.

most_recent

if TRUE then select the most recent entry.

Value

If most_recent is TRUE then a vector of one ID for each bank_name. Otherwise, multiple IDs may be returned in a list

Examples

1
2
3
4
5
6
bank_meta_data <- data.frame(ID_RSSID = c(10, 20, 30),
  Entity_Type = rep("FHD", 3),
  Name = c("HUNTINGTON BANCSHARES INCORPORATED", "KEYCORP", "PNC BANK CORP"))
targets <- c("HUNTINGTON BANCSHARES INCORPORATED", "KEYCORP", "PNC BANK CORP")
target_ids <- get_bank_ids(targets, bank_meta_data)
all(target_ids == c(10, 20, 30))

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