Arith-timeDay: Arithmetic Operators for 'timeDay' objects

Arith-timeDayR Documentation

Arithmetic Operators for timeDay objects

Description

Addition of time-of-day data to either "Date" or "POSIXt" classes. This is useful when dates and times are recorded in separate columns in a dataset.

Usage

## S4 method for signature 'timeDay,POSIXt'
Arith(e1, e2)

## S4 method for signature 'POSIXt,timeDay'
Arith(e1, e2)

## S4 method for signature 'timeDay,Date'
Arith(e1, e2)

## S4 method for signature 'Date,timeDay'
Arith(e1, e2)

Arguments

e1, e2

timeDay and POSIXt or Date objects. Missing values are permitted in either argument and result in a missing value in the output.

Value

A vector of class "POSIXct."

Examples

as.Date("2001-03-04") + as.timeDay("10:00")
## Not run: 
library(smwrData)
data(QW05078470)
# Note that the result is reported in the local time zone!
QW05078470$DATES + as.timeDay(QW05078470$TIMES)

## End(Not run)

USGS-R/smwrBase documentation built on Oct. 18, 2022, 9:55 a.m.