fars_read: Read file

Description Usage Arguments Value Examples

Description

This is a simple function that reads data from a .csv file. That file is coming from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.

Usage

1
fars_read(filename)

Arguments

filename

A character string giving the file name which will be reading by the function

Value

This function returns a dataframe with the information in the file. If the file does not exist, it will return an error.

Examples

1
2
3
filename_param <- system.file('data', 'accident_2013.csv.bz2',
                             package = 'farsdata')
fars_read(filename = filename_param)

daferpe/farsdata documentation built on May 25, 2019, 3:58 a.m.