Description Usage Arguments Value Examples
View source: R/fars_functions.R
This function plots a map of the specified state and the location of each observation in the FARS data for a specified year.
The function will return a message if there were no accidents for the specified state and year.
Note: The function will return an error if the specified state.num is not valid. Additionally, some state numbers, for example "2", cause an error due to specified plot regions being out of bounds.
1 | fars_map_state(state.num, year)
|
state.num |
An integer or character string of an integer specifing which state to plot. An error will be thrown if an invalid state number is specified. |
year |
An integer or character string of an integer specifying the year for which to plot the accidents. |
If there is data for the specified state and year, the function will plot a map of the state and the locations of the accidents for that year. If there are no recorded accidents for that year and state then the function will return a message to notify that case.
1 2 3 4 5 6 7 8 | ## Not run:
fars_map_state(13, 2013)
fars_map_state(13, "2013")
fars_map_state("13", 2013)
fars_map_state("13", "2013")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.