fars_map_state: Plots map of the state with accident data for a specified...

Description Usage Arguments Value Note

View source: R/fars_functions.R

Description

This function returns a FARS report for the state number and year passed as an argument

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

a numeric value

year

a character string or numeric

Value

plots a map for data filtered for the inputed state number from the file where filename contains the inputted year. If the state number is not found the the function will report an error message "invalid STATE number". If not accident records found for the state then a message is returned "no accident to plot" with a return value NULL

Note

The function replace the Longitude data with NA where the Logitude value is > 900 the function replace the Latitude data with NA where the Latitute value is > 90


ybbsharma/sofars2 documentation built on May 4, 2019, 2:31 p.m.