fars_read: read FARS files

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

read FARS data (US National Highway Traffic Safety Administration's Fatality Analysis Reporting System)from file

Usage

1
fars_read(filename)

Arguments

filename

, name of file to be read

Details

it is necessary to download the fars files before, this functions read the files from the working directory, if not an error will be thrown Throws an error if wrong file name is provided

Value

a data.frame with the data of file

Examples

1
2
3
4
5
6
library(dplyr)
library(readr)
library(tidyr)
f13path<-system.file("inst", "extdata", "accident_2013.csv.bz2")
file.copy(from=c(f13path),to=getwd())
fars_read('accident_2013.csv.bz2')

jmab20/farsfuncs documentation built on May 17, 2019, 8:15 a.m.