R/four.digit.year.R

Defines functions four.digit.year

Documented in four.digit.year

four.digit.year <- function(x, year = 1968) {
    n <- as.numeric(strftime(x, format = "%y"))%%100
    Y <- ifelse(n > year%%100, 1900 + n, 2000 + n)
    return(Y)
} 

Try the hydrostats package in your browser

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

hydrostats documentation built on June 1, 2022, 9:06 a.m.