fars_read: Read a FARS data file

Description Usage Arguments Details Value Examples

View source: R/fars_functions.r

Description

This is a read_csv function that reads a FARS data file given its name.

Usage

1

Arguments

filename

A string, such as returned by make_filename, representing the name of a FARS data in the current working directory.

Details

The function returns an error file does not exist if a file with the name from the input exist in the current working directory; otherwise, it returns a data.fram.

Value

A data.frame of the FARS data file.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# construct a file name using `make_filename`
file_name <- make_filenam(2013)
fars_read(file_name)

# supply file name explicitly
fars_read("accident_2013.csv.bz2")

## End(Not run)

lakrobinson/fars documentation built on June 5, 2020, 12:33 a.m.