fars_read: Read a FARS data file

Description Usage Arguments Details Value Examples

Description

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

Usage

1
fars_read(filename)

Arguments

filename

A string, such as returned by make_filename, represent a 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, other wise return 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)

MahShaaban/fars documentation built on May 8, 2019, 3:21 p.m.