knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

The fars.pack package loads, aggregates and plots FARS data. Here is an example of the package in action.

require(fars.pack)
old_path <- getwd()
file_path <- system.file("extdata", package = "fars.pack")
dir(file_path)
setwd(file_path)

# read data
fars2015 <- fars_read(dir()[1])
head(fars2015)

# plot data
# state number 1
fars_map_state(1, 2015)


rafal-gl/package_coursera documentation built on May 20, 2019, 5:58 p.m.