R/util.isLeapYear.R

Defines functions util.isLeapYear

Documented in util.isLeapYear

util.isLeapYear <- function(year){
	res <- vector(mode="logical", length=length(year))
	res <- rep(FALSE, length(res))
	res[which((year %% 4) == 0)] <- TRUE
	res[which((year %% 100) == 0)] <- FALSE
	res[which((year %% 400) == 0)] <- TRUE
	return(res)
}

Try the phenmod package in your browser

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

phenmod documentation built on May 29, 2017, 11:37 a.m.