Description Usage Arguments Value Examples
The function takes a state number and year as input and plots the locations of the accidents on a map. An invalid state number or year results in an error.
1 | fars_map_state(state.num, year)
|
state.num |
The number of a state in the US as per the FARS data
sets. Coerced to |
year |
The year for which data is to be plotted. Coerced to |
A plot of the accidents for the state.num
and
year
provided. Returns NULL
for invalid input
1 2 3 4 5 6 7 8 9 | ## Not run:
fars_map_state(44, 2010)
fars_map_state("15", 2010)
# Error
fars_map_state(45, 2030)
fars_map_state(-1, 2010)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.