Description Usage Arguments Value Examples
This function reads the data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes. Then selects data from a specific state and a specific year and plots the location of the accidents in a map of the state.
1 | fars_map_state(state.num, year)
|
state.num |
A number of a state (numeric, integer or character). |
year |
A year number (numeric, integer or character). |
Plot of a map of the state and the location of the accidents in a year. Error if the introduced year and state aren't numbers. Error if the introduced year doesn't exist (file doesn't exist). Error if the introduced state doesn't exist in the data. Error if the number of accident is zero for given year and state.
1 2 3 4 5 6 7 8 | ## Not run:
fars_map_state(1,2015)
fars_map_state("1",2015)
fars_map_state(1.00,2015)
fars_map_state(1,"2015")
fars_map_state(1,2015.00)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.