fars_read: Read Data from File

Description Usage Arguments Value Note Examples

View source: R/fars_functions.R

Description

This function checks for the existence of a file having a specified name. If the file exists, its contents are read and returned by the function.

Usage

1
fars_read(filename)

Arguments

filename

A character string giving the name of the file to be read. An error is generated if no file with the specified name exists in the working directory.

Value

A data.frame object containing the contents of the specified file.

Note

To ensure a filename passed to this function is properly constructed use the function in this package called make_filename.

Examples

1
2
3
4
## Not run: fars_read("accident_2013.csv.bz2")
fars_read(make_filename(2013))

## End(Not run)

jschonem/FARSdatatools documentation built on Feb. 15, 2021, 12:13 a.m.