fars_read: Read FARS Data.

Description Usage Arguments Details Value Examples

Description

fars_read reads FARS data into the environment.

Usage

1
fars_read(filename)

Arguments

filename

A character string giving the filename of the FARS data.

Details

This function reads data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS), given a filename for the data. It returns a tibble of the data. For this function to work properly, a filename pointing to an existing file must be given.

Value

This function returns a tibble containing the FARS data. If an incorrect filename is entered the function will stop.

Examples

1
2
3
4
5
6
7
8
full_filename <- system.file('./data/', 'accident_2013.csv.bz2',
                             package = 'FARSProject')
fars_read(filename = full_filename)

## Not run: 
fars_read(filename = 'filedoesnotexist')

## End(Not run)

nayak-neelavara/FARSProject documentation built on May 8, 2019, 3:14 a.m.