R support for Intraday frequencies

Description

create tif (TimeIndexFrequency) codes for hourly, minutely, and secondly ti's.

Usage

1
2
3
  hourly(n = 0)
minutely(n = 0)
secondly(n = 0)

Arguments

n

number of base periods to skip. That is, hourly(2) gives a tif code for a series observed every 2nd hour, while both minutely() and minutely(1) are for a series observed once per minute, secondly(30) means every 30 seconds, and so on.

Details

The current implementation has hourly(n) –> 2000 + n, minutely(n) –> 3000 + n, and secondly(n) –> 4000 + n. If n divides evenly into 3600 for secondly(n), the return code will be the same as hourly(n/3600). For secondly(n) and minutely(n), if n divides evenly into 60, the return code will be as if minutely(n/60) or hourly(n/60) had been called, respectively.

For hourly(n), n must evenly divide into 24 and be less than 24, i.e., n is one of 1, 2, 3, 4, 6, 8, 12. For minutely(n), n must be an even divisor of 1440, and less than 720. For secondly(n), n must divide evenly into 86400, and be no larger than 960.

Value

An integer tif code.

See Also

tif

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.