Description Usage Arguments Value Examples
This function takes state and year as parameters. It reads file based on year parameter and gathers data to plot based on state number parameter. It converts state number parameter as integer and stops if it cannot find state number is invalid. It outputs a message if does not find any accidents to plot. It returns the data plotted for state number by LONGITUDE > 900 and LATITUDE > 90 It uses functions: make_filename and fars_read
1 | fars_map_state(state.num, year)
|
state.num |
Valid State number as string or integer. |
year |
Valid year as integer or string. |
A plot of accidents by longitude and latitude for state number and year.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
fars_map_state(25, 2015)
fars_map_state(state.num=25, year=2015)
fars_map_state("25", "2015")
fars_map_state(state.num="25", year="2015")
fars_map_state(25, "2015")
fars_map_state(state.num=25, year="2015")
fars_map_state("25", 2015)
fars_map_state(state.num="25", year=2015)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.