Description Usage Arguments Details Value Note Examples
fars_map_state
plots the state given as an integer
argument and plots accidents for a given year
1 | fars_map_state(state.num, year)
|
state.num |
state number to plot accidents for |
year |
year of data to plot accidents that occured |
The function will take a year and state and attempt to plot accidents for a given state number. If there is no data for a state, the function will stop and throw an error. If there are no accidents a message will be returning indicating this.
a data.frame of filtered data, if there are no rows then returns invisible(NULL)
This function depends on map and points functions from the maps and graphics package respectively.
1 2 3 4 | ## Not run:
fars_map_state(1, 2013)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.