Description Usage Arguments Details Value Examples
The function loads into R bz2-compressed CSV for the year of interest. Canonical
filename can be conveniently constructed with the function make_filename
.
1 | fars_read(filename)
|
filename |
name (character string) of the file to be imported |
The function uses readr::read_csv to import the file and dplyr::tbl_df to construct the dataframe. It will not show how it formatted each column nor its loading progress. If it fails to find a specified file, it will throw an error, notifying the user that the file does not exist. The function assumes that the file is in the current working directory.
The function returns a tibble (a tidyverse version of the dataframe) with the data of interest.
1 2 3 4 5 | ## Not run:
fars_read("accident_2013.csv.bz2")
fars_read(make_filename(2013))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.