fars_read: Read the FARS file

Description Usage Arguments Value Note Source See Also Examples

View source: R/fars_functions.R

Description

This function will search for the input filename in the current directory, if the file exist, it will read in the file (.csv format) and store the file to current directory; or return error if the file does not exist.

Usage

1
fars_read(filename)

Arguments

filename

a string indicates the name of the file. Can use make_filename to generate a filename.

Value

This function returns a dataframe if the selected file exist; return an error message "file ... does not exist" if the file not exist.

Note

To generate a file name, use make_filename.

Source

Data source: US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS), which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes. For more information, please see https://crashstats.nhtsa.dot.gov/#/DocumentTypeList/23.

See Also

make_filename

Examples

1
## Not run: fars_read("accident_2013.csv.bz2")

mandyhee/farspkg documentation built on June 12, 2020, 6:03 p.m.