utils: Utilities for time indexes.

Description Usage Arguments Value Author(s) See Also

Description

Several small functions to extract information from POSIXct indexes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
hour(x)
minute(x)
second(x)
hms(x)
doy(x)
dom(x)
month(x)
year(x)
DoY(x)
DoM(x)
Month(x)
Year(x)
dst(x)
truncDay(x)

Arguments

x

A POSIXct vector.

Value

The functions year, month, day, hour, minute, second give the numeric value corresponding to their names.

doy and dom provide the (numeric) day of year and day of month, respectively.

Month, Year, DoY and DoM give the same result as month, year, doy and dom in a character string format.

hms gives the numeric value hour(x)+minute(x)/60+second(x)/3600

dst is +1 if the Daylight Savings Time flag is in force, zero if not, -1 if unknown (DateTimeClasses).

truncDay truncates the POSIXct object towards the day.

Author(s)

Oscar Perpiñán Lamigueiro.

See Also

as.POSIXct


solaR documentation built on Oct. 19, 2021, 9:06 a.m.