fars_read_years: fars_read_years lists the month and the year for each...

Description Usage Arguments Value Note Examples

View source: R/fars_functions.R

Description

fars_read_years lists the month and the year for each accident of the year called

Usage

1

Arguments

years

The argument of the funtion is a vector of years

Value

returns a tibble (data.frame) of the length (number of accidents) x 2, whereas the columns return the month and the year in which the accident occured.

Note

Receives name of the file from the make_filename function, and selects months. If there is no data for a specific year, there is an error message saying "invalid year: " with the year printed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: fars_read_years(2014)
# [[1]]
# A tibble: 30,056 x 2
# MONTH  year
# <dbl> <dbl>
# 1     1  2014
# 2     1  2014
# 3     1  2014
# 4     1  2014
# 5     1  2014
# 6     1  2014
# 7     1  2014
# 8     1  2014
# 9     1  2014
# 10     1  2014
# ... with 30,046 more rows

Sensalis/farsHK documentation built on Oct. 30, 2019, 11:51 p.m.