knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(Coursera3Sub) library(dplyr) library(maps) ```
This vignette is a brief overview of the Coursera3Sub package and its functionality. It provides some useful functions for its analysis.
Four functions are exported so that the user can use them
fars_read()
make_filename()
fars_summarize_years()
fars_map_state()
The function fars_read()
reads a data file from a path (as argument). It returns a loaded data set.
The function make_filename()
reads a year number as argument. It returns a file name for that year.
The function fars_summarize_years()
takes a vector/ list of years as an argument and returns a tables of accidents per month and year.
The function fars_map_state()
takes a state and a year as inputs and returns a plot of the state and its accident locations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.