Description Usage Arguments Details Value Examples
Draw the location of each accident in a given State in a given year.
1 | fars_map_state(state.num, year)
|
state.num |
A number corresponding to a State in the FARS data. |
year |
A character or number representing a single target year. |
Loads the file with the name "accidnet_year.csv.bz2"
where year
corresponds to the value of year
. Can only read and map one year at a time.
Calls map::maps and graphics::points to plot the accidnets by latitude and longtude.
Will produce an error if the state.num
is incorrect or the file for
the given year does not exist.
A plot of the accident locations in the State in the target year
1 2 3 4 5 | ## Not run:
fars_map_state(17, 2016)
fars_map_state(21, "2016")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.