library(farspackage)This package contains functions that read US National Highway Traffic Safety Administration’s Fatality Analysis Reporting System (FARS) data and summarize them
-
For reading the complete file use: fars_read(filename). It reads a CSV file and creates a tibble from it. Specify the filename using the filename argument . argument.
-
To make a file you have to use make_file(year) and specify an integer value for year argument .
-
The fars_read_years(years) function takes a numeric value as years argument and returns a list of tibbles consisting of two columns: MONTH and year.
-
The fars_summarize_years(years) function summarizes accidents for the specified years, grouped by months.
-
To plot the data for the specified state in the specified year you have to use the fars_map_state(state.num, year) function . state.num represents the state number and it takes a numeric value and year represents which year the accidents had token place and it is a numeric value .