timeSeries (version 3022.101.2)

time: Get and Set Time stamps of a 'timeSeries'

Description

Functions and methods extracting and modifying positions of 'timeSeries' objects.

Usage

getTime(x) setTime(x) <- value
"time"(x, ...) "time"(x) <- value

Arguments

value
a valid value for the component of time(x).
x
an object of class timeSeries.
...
optional arguments passed to other methods.

Value

Returns a 'timeDate' object.

Examples

Run this code
## Create Dummy timeSeries -      
   X <- timeSeries(matrix(rnorm(24), 12), timeCalendar())
   
## Return Series Positions -
   getTime(X)
   time(X)  
  
## Add / Subtract one Day from X
   setTime(X) <- time(X) - 24*3600 # sec
   X
   time(X) <- time(X) + 24*3600 # sec
   X

Run the code above in your browser using DataLab