make_fars_file: write FARS file based on FARS dbf datafile

Description Usage Arguments Value Note Examples

Description

Use the "accident.dbf" file from a known year obtained from the FTP site of the NHTSA and placed in the working directory and convert it to a csv.bz2 file with the correct filename to be used by the other fars functions.

Usage

1

Arguments

year

a numberic vector of length 1 representing the year of the dbf

Value

data.frame of the file that is written to the working directory.

Note

the function assumes that the user has put an "accident.dbf" file from the FARS FTP site of a given year in the working directory. If this file is available, the function will stop and show a message. Also, if the year given is not between 1975 and the year before the current year, the function will stop and show a message.

Examples

1
2
3
## Not run: 
make_fars_file(2012)
## End(Not run)

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