fars_read: fars_read

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

Reads in file to data variable using the read_csv function and creates a dataframe summarizing the contents.

Usage

1
fars_read(filename)

Arguments

filename

A character object which corresponds to a valid path of the data file. In case the file does not exist an error message is produced and execution stops.

Details

Building R Packages - Week 2 Assignment filename: fars_functions.R

These functions read in data taken from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System

Value

The function returns a dataframe based on the CSV file.

Examples

1
2
3
4
## Not run: 
accident_2015 <- fars_read(".inst/extdata/accident_2015.csv.bz2")

## End(Not run)

smallikarjun/MyfarsPkg documentation built on May 23, 2019, 2:01 a.m.