fars_read: Read FARS Data

Description Usage Arguments Details Value Note See Also Examples

View source: R/fars_functions.R

Description

The function reads data from a CVS file, stored on disk. The data are from the 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.

Usage

1
fars_read(filename)

Arguments

filename

A character string giving the name of the CVS data file to read, see notes.

Details

For more information, see:

Value

A data frame with data readed from the CVS data file, or an error/stop if the file does not exists.

Note

To generate file name use: make_filename.

See Also

make_filename

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(dplyr)
library(readr)
yr <- 2015
data <- yr %>%
  make_filename %>%
  fars_read
head(data)

## End(Not run)

raggichr/peergradedassignmentdocumentingcode documentation built on Feb. 10, 2020, 12:20 a.m.