fars_read: Import data

Description Usage Arguments Details Value Examples

Description

fars_read imports data into R session as tbl_df.

Usage

1
fars_read(filename)

Arguments

filename

name of a dataset as character string

Details

This is a wrapper function, not very complicated, it only reads data from disk. It stops if file is not found, returning a message. If it finds the file on disk, it imports it, suppresssing messages generated by readr::read_csv function. In the end, the function converts data to dplyr::tbl_df even though conversion is already done by readr::read_csv function.

Value

data.frame of class: data.frame and tbl_df

Examples

1
2
3
my_filename <- here::here("data/accident_2013.csv.bz2")
my_df <- fars_read(filename = my_filename)
my_df

Struya/mtrostR documentation built on May 15, 2019, 4:18 a.m.