fars_read: This function reads data in a data file from the US National...

Description Usage Arguments Details Value Note Examples

View source: R/fars_function.R

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

Path to the CSV file (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

fars_read will search within the specified path for the filename provided. If the file exists, it will be imported If it does not exist an error message will be returned.

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(2015) %>% fars_read

Souravp33/RPackageBuilt documentation built on May 28, 2019, 12:58 p.m.