qdate: Create datetime object from isolated pieces

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

Thin wrapper around [base::ISOdatetime()] that provides default arguments. All arguments are vectorized.

Usage

1
qdate(year, month = 1, day = 1, hour = 0, minute = 0, second = 0, tz = "UTC")

Arguments

year

Year (numeric)

month

Month (numeric, default = 1)

day

Day of the month (numeric, default = 1)

hour

Hour (numeric, default = 0)

minute

Minute (numeric, default = 0)

second

Second (numeric, default = 0)

tz

Time zone (character, default = "UTC")

Value

An object of class "POSIXct".

Author(s)

Alexey Shiklomanov

Examples

1
2
3
4
5
6
# Create dates given only the years (midnight, January 1)
qdate(2005:2010)
# Every September 5 (midnight)
qdate(2005:2010, 9, 5)
# ...at noon
qdate(2005:2010, 9, 5, 12)

ashiklom/fortebaseline documentation built on May 9, 2020, 1:56 a.m.