time.rwl | R Documentation |
Retrieve or set the time values for rwl and crn objects.
## S3 method for class 'rwl'
time(x, ...)
## S3 method for class 'crn'
time(x, ...)
time(x) <- value
x |
An object of class |
... |
Not used. |
value |
A |
A numeric
vector of time (typically in years) for the object. This is done via as.numeric(rownames(x))
but has been asked for by users so many times that it is being included as a function.
Andy Bunn
read.rwl
read.crn
library(utils)
data(co021)
# extract years
co021.yrs <- time(co021)
# set years -- silly example
time(co021) <- co021.yrs+100
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.