fars_read: Read data file

Description Usage Arguments Value Examples

Description

This is a simple function that reads a file by taking filename as input. If a filename doesn't exist in the working directory then the function stops with the message "file 'filename' does not exist" If a filename exist, the file will be read in this function as an imported data

Usage

1
fars_read(filename)

Arguments

filename

A character string of the filename of the data that need to be read

Value

a dataframe containing a representation of the data with class of tibble

Examples

1
2
fars_read(system.file("extdata", "accident_2015.csv.bz2", package = "FARSr"))
data <- fars_read(system.file("extdata", "accident_2014.csv.bz2", package = "FARSr"))

Byronxy/FARSr documentation built on May 23, 2019, 9:37 a.m.