fars_read: Read files from Fatality Analysis Reporting System

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

The function fars_read reads csv files from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System and creates a data frame out of the values.3

Usage

1
fars_read(filename)

Arguments

filename

A path to a csv file. Files ending in .gz, .bz2, .xz, or .zip will be automatically uncompressed.

Value

A data frame with the values of the csv file. If type of filename is not correct or the file does not exist, an error message is generated and nothing is returned.

Examples

1
2
setwd(system.file("extdata", package = "fars"))
fars_read("accident_2015.csv.bz2")

kfull/fars documentation built on May 28, 2019, 8:45 a.m.