fars_read: Read a FARS file

Description Usage Arguments Value Note Examples

Description

This Helper-function checks if the filename given exists and assumes the data is in .csv.bz2 format, which it will format as data frame.

Usage

1
fars_read(filename)

Arguments

filename

A character string representing a filename

Value

A data.frame with fars data from the file called 'filename'

Note

although the existance of the file (filename) is checked, it is assumed that the file is in csv format, if not a warning is passed by readr::read_csv.

this package comes with three example files that can be accessed using system.file("extdata", "accident_2013.csv.bz2", package = "farsfunctions") system.file("extdata", "accident_2014.csv.bz2", package = "farsfunctions") system.file("extdata", "accident_2015.csv.bz2", package = "farsfunctions")

Examples

1
2
3
## Not run: 
fars_read("accident_2015.csv.bz2")
## End(Not run)

RMHoek/farsfunctions documentation built on May 22, 2019, 12:41 p.m.