R/monthNum.R

Defines functions monthNum

Documented in monthNum

#' monthNum
#' @description Converts dates to the corresponding numeric month.
#' @param y date
#' @author 
#' Alan Jassby, James Cloern
#' @export
#' @examples
#'
#' monthNum(as.Date(c("2007-03-17", "2003-06-01")))
#'
monthNum <- 
function(y) {
  match(months(y, abbreviate = TRUE), month.abb)
}

Try the wql package in your browser

Any scripts or data that you put into this service are public.

wql documentation built on Oct. 25, 2026, 5:06 p.m.