Description Usage Arguments Value Note Examples
View source: R/fars_functions.R
This is function that takes as input the state and the year and provides as output a map of the specified state demonstarting the exact location of fatal injuries suffered in motor vehicle traffic crashes (as dots).
1 | fars_map_state(state.num, year)
|
state.num |
The state number. Only one value can be passed as state.num (either numeric or character). If not a proper state.num is specified, an error message will be thrown. |
year |
The value of the year. Only one value can be passed as year (either numeric or character). |
This function returns a plot of the incidences for the specified year and state. Specifically, it will return a map of the state specified including the incidences as dots.
Needed packages for this function are: dplyr, maps, graphics. Furthermore, if there are not incidences for the specified combination of year/state number, a relevant message will pop-up.
1 | ## Not run: fars_map_state(45,2013)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.