fars_map_state: Plot of accident coordinates for given state and year on...

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function plots coordinates represented by latitude and longitude for a given input state and year

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A numeric value representing state in FARS dataset

year

A numeric value of year

Value

This functions returns a map of the input state with accident cooridnates plotted onto the map. Latitude greator than 90 and longitude 900 is not plotted If input state is not found in dataset, error is returned with message as "invalid state number <state number>" If no accidents are present in dataset for given state, a message is returned as "no accidents to plot"

Examples

1
tryCatch({fars_map_state(1,2013)},error=function(e){return(NULL)})

sandeepbm/FARSFunctions documentation built on May 17, 2019, 7:58 a.m.