R/FarsFunctions.R

Defines functions make_filename

Documented in make_filename

#' Format name and year
#' This function formats the name of the file with the fars data and the year
#'
#' @param year a numeric value indicating the year
#'
#' @return a character string with the formatted file name and year
#'
#' @examples
#' make_filename(2013)
#'
#' @export
make_filename <- function(year) {
  year <- as.integer(year)
  sprintf("accident_%d.rda", year)
}
fbiga/CourseraFB2 documentation built on March 3, 2021, 3:32 p.m.