fars_read: Load a CSV file as data frame tbl

Description Usage Arguments Details Value Examples

Description

Loads a CSV file defined by filename argument and returns the data as a data frame tibble. Ends with an error if filename is not valid

Usage

1
fars_read(filename)

Arguments

filename

Path to the CSV file (character)

Details

For the filename provided, the function checks if the file exists. If not, it stops with an error message. Otherwise the file is read in using read_csv and returned as a data frame tibble.

Value

The function returns a tibble (data.frame) based on the CSV file.

Examples

1
2
3
4
## Not run: 
data_2010 <- fars_read("./data/accident_2010.csv.bz2")

## End(Not run)

faizan-khan-iit/fars documentation built on May 16, 2019, 9:59 a.m.