Learn R Programming

dplR (version 1.7.2)

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 rwl
time(x, …)
# S3 method for 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.

See Also

read.rwl read.crn

Examples

Run this code
# NOT RUN {
library(utils)
data(co021)
# extract years
co021.yrs <- time(co021)
# set years -- silly example
time(co021) <- co021.yrs+100
# }

Run the code above in your browser using DataLab