Description Usage Arguments Details Value Note Examples
View source: R/fars_function.R
This function reads data in a data file from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System.
1 | fars_read(filename)
|
filename |
Path to the CSV file (character) |
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.
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.
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.
1 | ## Not run: make_filename(2015) %>% fars_read
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.