R/make_filename.R

#'Create File name
#'
#' Returns a character vector containing a formatted combination of the year of the data, which is needed, and the full filename.
#'
#'@param year A non-negative integer specifying the desired year, only for years \code{2013, 2014 & 2015}. Double values will be coerced to integer. Charachter valuse do not allowd.
#'
#'@return A character vector which specify the full filename based on the year of the input.
#'
#'@examples
#'\dontrun{make_filename(2013)}
#'
#'@export




make_filename <- function(year) {
  year <- as.integer(year)
  sprintf("accident_%d.csv.bz2", year)
}
AlphaIgor/Test documentation built on May 19, 2019, 10:47 p.m.