fars_map_state: Function 'fars_map_state' plots the contour of the state in...

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

Function fars_map_state plots the contour of the state in question and points with accident locations for a given year.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

State number, a value between 1 and 56

year

Four-digit year, as integer or as a string (i.e. 2001, "2001").

Value

Plot of a contour of the state in question with geographical locations of accidents (as dots) for a given year.

If the requested year input is not present in available data, the function stops and returns an error: "file 'filename_YEAR.csv.bz2' does not exist".

If the requested state number is not present in data, the function stops and returns an error: "invalid STATE number: number"

Examples

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

## End(Not run)

kurowska/fars documentation built on May 20, 2019, 7:06 p.m.