fars_map_state: Function to reads a file based on year parameter and plots...

Description Usage Arguments Value Examples

Description

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

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

Valid State number as string or integer.

year

Valid year as integer or string.

Value

A plot of accidents by longitude and latitude for state number and year.

Examples

 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)

itjmt96/FARS documentation built on May 18, 2019, 5:52 a.m.