fars_map_state: Function "fars_map_state" - Display accidents map by state...

Description Usage Arguments Value Examples

Description

This function displays a plot with a state map including the accidents location by year. The functions make_filename and fars_read contribute to this function. If the state number is invalid the function shows an error message "invalid STATE number: ". If there are no accidents in the speicific state in the specified year the function shows warning message "no accidents to plot".

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

an integer with the State Code

year

a string or an integer

Value

This function returns a map with the accidents in the speicified state at the specified year. It returns NULL and warning message if no accidents recorded and returns warning message if the state number is invalid.

Examples

1
2
3
4
## Not run: 
fars_map_state(42, 2013)

## End(Not run)

olb1605/FARS_Package_Coursera documentation built on May 23, 2019, 4:05 a.m.