fars_read: Read file

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function reads data from .csv file from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS), which is a nationwide census, providing the American public yearly data, regarding fatal injuries suffered in motor vehicle traffic crashes.

Usage

1
fars_read(filename)

Arguments

filename

A character string with the name of the file to read

Details

For more information, see: \itemhttps://www.nhtsa.gov/Data/Fatality-Analysis-Reporting-System-(FARS)

Value

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

Examples

1
2
3
4
5
library(dplyr)
library(readr)
yr <- 2015
data <- yr %>% fars_read
head(data)

cregexp/MyPackage documentation built on Nov. 4, 2019, 9:17 a.m.