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

load fars package

library(fars)

make_filename function makes a file name with a given year of interest

print(make_filename(2013))

fars_read function reads in data file with a given filename

dat<-fars_read(make_filename(2013))
head(dat)

fars_read_years function reads in data of a given year and returns the months and year variables

dat<-fars_read_years(2013)
head(dat)

fars_summarize_years function makes a table of total number of observations by year and month

fars_summarize_years(2013)

fars_map_state function creates a map of a given state

at a given year

fars_map_state(state.num=10,year=2013)


hsm-stephanie/fars documentation built on Jan. 7, 2020, 12:25 a.m.