knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This package contains a set of functions to analyze fars data. This vignette will discuss the use of each of the avialble function.
In order to create a filename in the correct format, make_filename function can be used:
library(fars) library(magrittr) file_2013 <- make_filename(2013) file_2013 <- paste0(system.file("extdata", package = "fars"), "/",file_2013)
The filename created above can be read using fars__read function:
fars_read(file_2013)
Summary of fatalities as a function of month and year can be seen using fars_summarize_years function:
fars_summarize_years(2013)
Fatalities for a given state and year can be seen on a map using fars_map_state function:
fars_map_state(1, 2013)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.