fars_read: Reads in data files

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

Reads data from .csv files from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS), - public yearly data, regarding fatal injuries suffered in motor vehicle traffic crashes and converts them into data frame tbl

Usage

1
fars_read(filename)

Arguments

filename

A character string with the name/path to file to read function will rise an error if input data file doesn't exist or path to it is incorrectly specified

Value

A data frame tbl with data readed from the csv file, or an error if the file does not exists.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
  library(dplyr)
  library(readr)
  yr <- 2014
  data <- yr %>%
  make_filename %>%
  fars_read
head(data)

## End(Not run)

MaxDQlikDev/my.far.pkg documentation built on Feb. 13, 2021, 12:49 a.m.