fars_read: Read in a file. This function will check to see if a file...

Description Usage Arguments Value Examples

Description

Read in a file. This function will check to see if a file exists based on the file path.

Usage

1
2
fars_read(filename, filepath = system.file("extdata", filename, package =
  "fars"))

Arguments

filename

The name of the file to read.

filepath

a character string with the directory of the package's data files.

Value

This file returns the data in the csv file as a tibble.

Examples

1
2
3
4
5
6
## Not run: 
#' fars_read('accident_2013.csv.bz2') #only if in the same directory as data
fileName <- system.file("extdata","accident_2013.csv.bz2",package="fars") #when using provided data in package
fars_read(fileName)

## End(Not run)

cmoten/fars documentation built on May 6, 2019, 2:30 p.m.