| window.rwl | R Documentation |
Take the years from start to end of an "rwl",
"rwi", "bai" or "crn" object.
## S3 method for class 'rwl'
window(x, start = NULL, end = NULL, ...)
## S3 method for class 'rwi'
window(x, start = NULL, end = NULL, ...)
## S3 method for class 'bai'
window(x, start = NULL, end = NULL, ...)
## S3 method for class 'crn'
window(x, start = NULL, end = NULL, ...)
x |
an object of class |
start, end |
the first and last years to keep, each a single
number. |
... |
not used. |
The years are those in time(x). The rows are taken with
[, so an "rwl", "rwi" or "bai" object keeps its class
and its provenance record, cut down to the years that remain (see
[.rwl). Series with no values in the window are
dropped from an "rwl", "rwi" or "bai" object, with a message
naming them, since an empty series is not one any dplR function can
use; if no series has values in the window, that is an error. The
years returned are still the ones asked for. subset drops
empty series in the same way. x[i, ] does not: [
returns every series it is asked for, empty or not, so that its
columns stay lined up with anything indexed alongside them (see
[.rwl). Use window to take years for analysis.
A window is usually taken to line the data up with something else, so
a window that runs past either end of x gives a warning that
says which years were returned, and a window that does not overlap
x at all is an error.
An object of the same class as x, holding the years from
start to end and the series with values in them.
Andy Bunn
time.rwl, [.rwl,
window
data(ca533)
ca533.1800s <- window(ca533, 1800, 1899)
range(time(ca533.1800s))
ca533.crn <- chron(detrend(ca533, method = "Spline"))
tail(window(ca533.crn, start = 1950))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.