fars_read_years: Creates a list of dataframe showing the variables MONTH and...

Description Usage Arguments Details Value See Also

View source: R/fars_read_years.R

Description

fars_read_years takes a numerical vector representing which years in the data should be included in the data frame output. For this function to work, data should be in .csv.bz2 format located in the same directory as the working directory. In case the data for a particular year is unavailable, the function will show a warning and return null for the year that was not available.

Usage

1

Arguments

years

A numerical vector indicating which years to search for in the data.

Details

If you have a file from FARS that is in .csv format but not in .csv.bz2 format, you can convert it to .csv.bz2 format by using the write.csv function in R.

Value

A list of data frames for each year that was requested. The data frame will have the variables MONTH and year. Each row will contain a single case or observation that was recorded for a particular month of that year.

See Also

make_filename

fars_read_years


DocOfi/FARSread-Package documentation built on May 21, 2019, 3:07 a.m.