which.leap: Leap years

View source: R/helpers.R

which.leapR Documentation

Leap years

Description

Return the indices of leap years in a vector of years

Usage

which.leap(years)

Arguments

years

a integer vector of (gregorian) years

Value

a vector of indices of the position of leap years

Author(s)

J. Bedia

References

https://en.wikipedia.org/wiki/Leap_year#Algorithm

See Also

Other get.helpers: get2DmatCoordinates(), getCoordinates(), getDim(), getGrid(), getGridProj(), getGridVerticalLevels(), getRefDates(), getSeason(), getShape(), getStationID(), getVarNames(), getWT(), getYearsAsINDEX(), setGridProj(), typeofGrid()

Examples

leap.years <- which.leap(1885:1937)
(1885:1937)[leap.years]

SantanderMetGroup/transformeR documentation built on Nov. 25, 2024, 1:25 p.m.