fars_read: Read a FARS Data File

Description Usage Arguments Details Value Examples

Description

This function reads a (possibly compressed) .csv format file specified by the filename argument and returns it as a tbl_df data.frame.

Usage

1
fars_read(filename)

Arguments

filename

A character string giving the name of the .csv format file to be read.

Details

The function will fail if the file specified by the filename argument does not exist. The read_csv function may fail if the file is not readable. Any warnings introduced by parsing failures are suppressed.

The following functions are imported: readr::read_csv, dplr::tbl_df.

Value

This function returns a tbl_df form of a data.frame.

Examples

1
2
3
4
#improper name format
#not run, fails fars_read("fars.csv")

fars_read("accident_2014.csv.bz2")

dmendres/farsAssignment documentation built on May 15, 2019, 9:20 a.m.