fars_read: Reads the named csv file into a data table

Description Usage Arguments Details Value Examples

Description

fars_read is a simple function that reads a csv file and returns a data table. If a file for a given year is not found a warning is issued showing the year that is not valid.

Usage

1
fars_read(filename)

Arguments

filename

character name of the csv file to be read - must be a vector of length 1 or an error message is returned.

Details

This routine calls read_csv and returns a 'tbl_df' table data frame. The routine has no expectations for (nor awareness of) the FARS data structures.

Value

data frame coerced from the csv file input

Examples

1
2
3
4
5
## Not run: 
df <- fars_read("data/fars_data.csv")
my.data.frame <- fars_read("data/accident_2002.csv.bz2")

## End(Not run)

jrwalker-projects/farsfunctions documentation built on May 29, 2019, 1:50 a.m.