fars_read: Read a file into a data frame table

Description Usage Arguments Details Value Note Examples

Description

This function reads data in a data file from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System.

Usage

1
fars_read(filename)

Arguments

filename

A file name that you want to read; it should be a character.

Details

fars_read(filename) utilizes read_csv. In the end, this function provides a 'tbl_df' class to a data frame. See tibble-package for more details.

Value

This function returns a data frame table that stores data. However, If the file you want to read does not exist, it gives you an error message.

Note

If you need to read data for multiple years at a time, use fars_read_years. In addition, you can use make_filename to generate a file name more easily.

Examples

1
## Not run: make_filename(2013) %>% fars_read

JayLKim/farsCoursera documentation built on May 7, 2019, 10:33 a.m.