fars_read: fars_read()

Description Usage Arguments Details Value Examples

View source: R/core.R

Description

This (internal) function checks for the existance of the desired file, of which the name is passed to the function. If the file exists it is silently read with read_csv from the readr-package, else it returns an error.

Usage

1
fars_read(filename)

Arguments

filename

The filename to be read in, files originaly come from https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars but these functions expect an bz2-zipped format

Details

the read data is transformed in a data.frame

Value

"file 'filename' does not exist" when file is not found

a data.frame with the contents of the file-data when the file is found and read correctly

Examples

1
fars_read(testfile.bz2)

vanzanden/coursera3week4 documentation built on March 19, 2018, 3:05 a.m.