Description Usage Arguments Value
View source: R/fars-functions.R
This is a function that generates a data frame for a given year (years
) using the functions make_filename
and fars_read
and plots the accidents for a given state (state.num
).
An error message is printed if state.num
does not appear in the FARS data set ("invalid STATE number")
or if no accidents appeared ("no accidents to plot")
1 | fars_map_state(state.num, year)
|
state.num |
A numerical value corresponding to a state in the FARS data frame |
year |
A numeric value denoting the year during which data should be gathered |
This function plots the location of the accidents on a map of a given state in a given year
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.