fars_read: Read FARS file

Description Usage Arguments Value Note Examples

Description

This function read the FARS data file using read_csv from readr package using automatic import for data type. Using read_csv, it reads standard and compressed csv.

Usage

1
fars_read(filename)

Arguments

filename

A character string with name of the file to read. If filename do not exists the function stops execution.

Value

a data frame tbl (tibble) with data read from file.

Note

The function makes a check if the file exists.

Examples

1
2
3
4
5
6
## Not run: 
    filename <- "accident_2015.csv.bz2" 
    myData <- function(filename)

## End(Not run)
 

TizVic/BuildingAnRPackage documentation built on May 4, 2019, 1:07 p.m.