time
From timeSeries v3022.101.2
by Tobias Setz
Get and Set Time stamps of a 'timeSeries'
Functions and methods extracting and modifying positions of 'timeSeries' objects.
- Keywords
- chron
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
library(timeSeries)
## 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
Community examples
Looks like there are no examples yet.