fars_read: Read file with FARS data

Description Usage Arguments Details Value Note See Also Examples

Description

This helper function (not exported) reads FARS data from .csv file, stored in the current working directory. Each file contains data about fatal injuries in MV accidents in one year.

Usage

1
fars_read(filename)

Arguments

filename

A character string with the name of the file to read, see notes.

Details

For more information on the data, see:

Value

A data frame (tbl_df) with data read from the csv file, or an error if the file does not exists.

Note

Make filename with: make_filename

See Also

make_filename

Examples

1
2
3
4
5
library(magrittr)

year <- 2015
data_2015 <- FARS:::fars_read(FARS:::make_filename(year))
head(data_2015)

KvEijden/FARS documentation built on June 11, 2019, 1:30 p.m.