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(), getGridProj(), getGridVerticalLevels(), getGrid(), 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 Oct. 28, 2023, 5:26 a.m.