fars_read: Reads a delimited file into a tibble object.

Description Usage Arguments Details Value Warning Examples

View source: R/fars_functions.R

Description

The function fars_read reads the contents of a compressed file in .bz2 format and returns them in a tibble object.

Usage

1
fars_read(filename)

Arguments

filename

The name of the compressed file which data are to be read from (a string value). If the file does not exist in the working directory, you should specify the whole path.

Details

The function uses the algorithm of the read_csv function.

Value

A tibble object with the contents of the filename.

Warning

Provided that the file does not exist, the function will throw an error.

Examples

1
2
3
4
5
# We set the working directory where the compressed files are stored within
# the package.
WD <- setwd(system.file("extdata", package = "rfars"))
fars_read("accident_2013.csv.bz2")
setwd(WD)

Cesar-Urteaga/rfars documentation built on May 27, 2019, 7:28 a.m.