fars_read: Read csv

Description Usage Arguments Value Note See Also Examples

Description

This function makes use of readr's read_csv to read a filename.

Usage

1
fars_read(filename)

Arguments

filename

A character string giving the text the file will read

Value

This function returns a tbl_df object if file exist. (Warning: Function may fail if file does not exist)

Note

function is part of an exercise in the week2 assignment of a coursera course titled, Building R Packages

function is for illustrative purposes, use with care

function assumes data is from nhtsa.gov

function assumes data can be found in the working directory

See Also

make_filename for making a valid file name, fars_read_years, for extension of this functionality

Examples

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

ZhangHaoquan/BuildingAnRPackage documentation built on May 8, 2019, 9:46 a.m.