R/YMD.internal.r

Defines functions YMD.internal

Documented in YMD.internal

#' Add calendar year, month, and day of year columns
#' 
#' @param TS Output from \code{\link{create.ts}} function.
#' @return Returns a data.frame with year, month, and doy columns appended.
#' @author Jennifer Dierauer

YMD.internal <- function(TS) {
    TS$year <- as.numeric(format(TS$Date, "%Y"))
    TS$month <- as.numeric(format(TS$Date, "%m"))
    TS$doy <- as.numeric(format(TS$Date, "%j"))
    
    return(TS)
}

Try the FlowScreen package in your browser

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

FlowScreen documentation built on May 2, 2019, 1:09 p.m.