Description Usage Arguments Value Note Source Examples
FARS is a nationwide census providing NHTSA, Congress and the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes The data files are in CSV format, often compressed. Function could read CSV and BZ2 files as well. It has 50 variables=columns (eg. STATE, CITY, COUNTY, DAY, MONTH, YEAR, FATALS etc.), and around 30k records.
1 | fars_read(filename)
|
filename |
CSV or CSV.BZ2 filename with path leading to it as Character. |
A tibble (tbl_df, tbl, data.frame) containing the FARS dataset
Existence of the file is checked at runtime. Internally read_csv function is used, which is part of package "readr", and need to be installed beforehand. Second package dependence is dplyr, which is used for formatting output data.frame.
website http://www-fars.nhtsa.dot.gov/Main/index.aspx
1 2 | ## Not run: fars_file<-fars_read("path_to_your_file")
## Not run: summary(fars_file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.