fars_read: fars_read

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

Function that reads in the fars data

Usage

1
fars_read(filename)

Arguments

filename

A character string giving the path to the file to be read

Details

The function uses read_csv to import the data and then converts it to a dataframe using tbl_df. read_csv is silent through the use of suppressMessages

stops processing if the file does not exist at the path

Value

if the file exists at the path, it returns a data frame with the parsed data using the column types inferred from the first 1000 rows of data. If the file name does not exist the function stops with a message

Examples

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

## End(Not run)

danlanguedoc/farsdata documentation built on May 17, 2019, 4 p.m.