R/get.days.R

Defines functions get.days

Documented in get.days

get.days <- function(year) {
    days <- c()
    d1 <- as.Date(paste(year, "-01-01", sep = ""))
    d2 <- as.Date(paste(year, "-12-31", sep = ""))
    day <- difftime(d2, d1) + 1
    days <- rbind(day, days)
    return(as.vector(days))
} 

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.