R/make_filename.R

Defines functions make_filename

Documented in make_filename

#' Creates a file name for a given year
#'
#' @param year A numeric or character vector containing a year or years (currently only avaible between 2013 and 2015)
#'
#' @details Possible to provide a vector of years.  Currently only avaible between 2013 and 2015
#'
#' @return Retuns a file name as a character
#'
#' @examples make_filename(2013)
#'
#' @export
make_filename <- function(year) {
  year <- as.integer(year)
  sprintf("../data/accident_%d.csv.bz2", year)
}
ekawabata/BuildingAnRPackage documentation built on May 31, 2020, 12:32 a.m.