R/leapYears.R

leapYears <- 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 phenex package in your browser

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

phenex documentation built on May 1, 2019, 10:56 p.m.