read.fb: FB file reader

Description Usage Arguments Format Value Note Examples

Description

Read in funding bucket files via data.table::fread and convert them to the "fb" class. The header is stored as attributes. Applies attrubutes based off of the file header information.

Usage

1
2
3
4
5
char_cols

read_header(file_path)

read.fb(file_path)

Arguments

file_path

Path to fb .csv file.

Format

An object of class list of length 52.

Value

A data.table object that is also class 'fb.'

Note

Could format the columns coming in as factors if that were desirable.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
require(data.table)
folder_path  <- 'C:/Users/dalrymplej/Dropbox/EToPac/data-sets'
file_name <- 'fb contract 10_01_14_to_07_31_15 run 10_19_15.csv'
file_name <- 'fb direct 10_01_14_to_07_31_15 run 10_19_15.csv'
file_path <- file.path(folder_path, file_name)
my_fb_dt <- read.fb(file_path)
lapply(my_fb_dt, class)
attributes(my_fb_dt)

## End(Not run)

JamesDalrymple/wccmh documentation built on May 7, 2019, 10:20 a.m.