fars_read: Read FARS Data File

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

'fars_read()' is a helper function used by 'fars_read_years()' and 'fars_map_state()', which reads in an annual FARS data file. The file is supposedly the query output from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, exported into a .csv file and compressed in the bz2 format.

Usage

1
fars_read(filename)

Arguments

filename

A character string or object representing path to files

Value

A tibble contains the contents of input file, the first part of which will be print out to console as a side effect. Invalid path will result in a "file ... does not exist" error.

Examples

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

## End(Not run)

johnxz/farsr documentation built on Dec. 21, 2021, 2:14 a.m.