fars_read: Read data from external source and output it

Description Usage Arguments Value Examples

Description

This function returns a tibble data frame extracted from a CSV file or a CSV file encoded in a .bz2 file. It works best used in conjunction with the make_filename function to provide a correctly formatted input. Note that it works within the current working directory unless a full path is specified.

Usage

1
fars_read(filename)

Arguments

filename

A character string providing the name of the file containing the wanted data.

Value

This function returns a tibble data frame as generated by first using the read_csv function contained in the readr package and then passing the result on to the dplyr package function tbl_df. If the provided filename does not exist, an appropriate error is shown.

Examples

1
2
3
4
5
## Not run: 
fars_read("C:/Users/All/Documents/Testy/R/data/accident_2013.csv.bz2")
data <- fars_read(make_filename(2013))

## End(Not run)

supervan2/Testy documentation built on May 17, 2019, 2:47 p.m.