knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Intro

The package (functions) is provided to process, manipulate and visualize data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (https://www.nhtsa.gov/Data/Fatality-Analysis-Reporting-System-(FARS)), which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.

Package contents

The package comprises functions as follows: fars_read(); make_filename(); fars_read_years(); fars_summarize_years(); * fars_map_state();

Brief description of each function:

How to use it:

  1. Make filenames to be read considered in the input parameter (years -> single year or vector of years): filename_input <- make_filename(c(1978,1979))

  2. Read raw data from the file: input_data <- fars_read(filename_input)

  3. Manipulate data per annum: annual <- fars_read_years (years)

  4. Summarize per annum: summary <- fars_summarize_years (years)

  5. Make a chart: fars_map_state(1, 1978)



demydd/Rpackagebuild documentation built on May 12, 2019, 6:27 p.m.