fars_map_state: Plot Accidents

Description Usage Arguments Value Note Examples

Description

Plot Accidents

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

single valid number representing a state number in the dataset

year

single valid number representing year

Value

This function returns a base graphics plot outlining the shape of the state with dots overlaying to represent accident occurance (Warning: Function may fail if file does not exist)

Note

function is part of an exercise in the week2 assignment of a coursera course titled, Building R Packages

function is for illustrative purposes, use with care

function assumes data is from nhtsa.gov

function assumes data can be found in the working directory

maps package requires a database of maps that can be found in mapdata package

Examples

1
## Not run: fars_map_state(1, 2013)

ZhangHaoquan/BuildingAnRPackage documentation built on May 8, 2019, 9:46 a.m.