firstof: Create a POSIXct Object

firstofR Documentation

Create a POSIXct Object

Description

Easily create of time stamps corresponding to the first or last observation in a specified time period.

Usage

firstof(year = 1970, month = 1, day = 1, hour = 0, min = 0, sec = 0, tz = "")

lastof(
  year = 1970,
  month = 12,
  day = 31,
  hour = 23,
  min = 59,
  sec = 59,
  subsec = 0.99999,
  tz = ""
)

Arguments

year, month, day

Numeric values to specify a day.

hour, min, sec

Numeric vaues to specify time within a day.

tz

Timezone used for conversion.

subsec

Number of sub-seconds.

Details

This is a wrapper to ISOdatetime() with defaults corresponding to the first or last possible time in a given period.

Value

An POSIXct object.

Author(s)

Jeffrey A. Ryan

See Also

ISOdatetime()

Examples


firstof(2000)
firstof(2005,01,01)

lastof(2007)
lastof(2007,10)


xts documentation built on June 22, 2024, 9:56 a.m.