fars_read: Read FARS file

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function checks if the file exists in the work directory. If does, it load it to a data frame.

Usage

1
fars_read(filename)

Arguments

filename

The file name that has the data that should be loaded.

Details

This function uses read_csv function from readr package. In order to load the file, it should be in the working directory.

Value

This functions returns a data frame with file data loaded, if it exists. If the file doesn't exist, it stops the function and return a message telling that the file doesn't exist.

Examples

1
2
3
4
## Not run: 
fars_read("data/accident_2013.csv.bz2")

## End(Not run)

TarsoRodriguez/fars documentation built on May 17, 2019, 2:46 p.m.