fars_read: function "fars_read"

Description Usage Arguments Details Value References Examples

View source: R/fars_functions.R

Description

Read a file that delivers data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System and provide a data frame tbl

Usage

1
fars_read(filename)

Arguments

filename

The name of the file which the data are to be read from. Each row of the table appears as one line of the file. If it does not contain an absolute path, the file name is relative to the current working directory, getwd(). Tilde-expansion is performed where supported. This can be a compressed file (see file).

Details

The function stopped with the message "file <filename> does not exist" if the file can not read.

Value

This function returns a tibble of ( "tbl_df", "tbl", "data.frame" )

References

https://www.nhtsa.gov/Data/Fatality-Analysis-Reporting-System-(FARS)

Examples

1
2
tf <- "accident_2015.csv.bz2"
fars_read( filename = tf )

ap-wi/fars documentation built on May 6, 2019, 4:37 p.m.