TS: bless a numeric vector with "timestamp" class

View source: R/TS.R

TSR Documentation

bless a numeric vector with "timestamp" class

Description

adds c("POSIXt", "POSIXct") to the beginning of the class attribute of a numeric vector so that operations such as arithmetic and printing treat it as a timestamp.

Usage

TS(x)

Arguments

x

numeric vector; should be seconds since the unix epoch (1 Jan 1970 GMT).

Value

structure(x, class=c("POSIXt", "POSIXct", class(x)))

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


MotusWTS/motusServer documentation built on Oct. 13, 2024, 7:31 p.m.