Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

A quick function that when provided a numeric vector of years returns a boolean vector where TRUE == Leap year.
is.leapyear=function(year){
#http://en.wikipedia.org/wiki/Leap_year
return(((year %% 4 == 0) & (year %% 100 != 0)) | (year %% 400 == 0))
}