R/make_filename.R

Defines functions make_filename

Documented in make_filename

#' Create filename for Fatality Analysis Reporting System data
#' 
#' This is a helper hunction to create a filename including a year of the dataset.
#'
#' @param year A year of the dataset
#'
#' @return Function returns a character string with filename including year of the dataset.
#' 
#' @examples
#' make_filename(2017)
#' 
#' @export
make_filename <- function(year) {
  year <- as.integer(year)
  sprintf("accident_%d.csv.bz2", year)
}
a7n7k7a7/farsData documentation built on May 28, 2019, 3:57 p.m.