fars_read: Load a FARS data file

Description Usage Arguments Value Note Examples

Description

This function loads a selected csv data file and returns a tibble with coresponding variables. It is a wrapper for [readr]read_csv.

Usage

1
fars_read(filename)

Arguments

filename

a character with a name of a file to be loaded

Value

a tibble with the same structure as the input file

Note

This function will return an error if it does not find a file from filename parameter. Make sure you provide a proper file path.

Examples

1
2
3
4
5
# set your wd to a directory with FARS data files
setwd("data")
fl <- "accident_2013.csv.bz2"
fars2013 <- fars_read(fl)
str(fars2013)

rafal-gl/package_coursera documentation built on May 20, 2019, 5:58 p.m.