R/year_month.R

Defines functions year_month

#' Year_Month
#'
#' Function will create standard year month format from date field
#'
#' @param x date from dataset to be converted
#'
#'
#'
#' @import tidyverse
#'
#' @export
year_month <- function(x) {
  paste(year(x), "-", str_pad(month(x), 2, "left", "0"), sep = "")
}
msuder29/shorty_package documentation built on Feb. 28, 2025, 5:42 a.m.