Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

time.rwl

Retrieve or set the time values for rwl and crn objects


Description

Retrieve or set the time values for rwl and crn objects.

Usage

## S3 method for class 'rwl'
time(x, ...)
## S3 method for class 'crn'
time(x, ...)
time(x) <- value

Arguments

x

An object of class "rwl" or an aboject of class "crn".

...

Not used.

value

A numeric vector to assign the time.

Value

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.

Author(s)

Andy Bunn

See Also

Examples

library(utils)
data(co021)
# extract years
co021.yrs <- time(co021)
# set years -- silly example
time(co021) <- co021.yrs+100

dplR

Dendrochronology Program Library in R

v1.7.2
GPL (>= 2)
Authors
Andy Bunn [aut, cph, cre, trl], Mikko Korpela [aut, cph, trl], Franco Biondi [aut, cph], Filipe Campelo [aut, cph], Pierre Mérian [aut, cph], Fares Qeadan [aut, cph], Christian Zang [aut, cph], Allan Buras [ctb], Jacob Cecile [ctb], Manfred Mudelsee [ctb], Michael Schulz [ctb], Klesse Stefan [ctb], Frank David [ctb], Visser Ronald [ctb]
Initial release
2021-01-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.