fars_read: read FARS files

View source: R/fars_functions.R

fars_readR Documentation

read FARS files

Description

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

Usage

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

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 Feb. 25, 2025, 2:36 a.m.