rev_time_axis: Reverse the time axis of 'zoo::zoo'

View source: R/Proxytools_helpers.R

rev_time_axisR Documentation

Reverse the time axis of 'zoo::zoo'

Description

Reverse the time axis of 'zoo::zoo'

Usage

rev_time_axis(xin)

Arguments

xin

Proxytibble with proxy data in 'zoo::zoo' format, or irregular time series object ('zoo::zoo'), xin can be multivariate

Value

zoo with returned time axis

Examples

# Load Monticchio example data from PTBoxProxydata
library(PTBoxProxydata)
mng <- PTBoxProxydata::ProxyDataManager()
monticchiodata <- PTBoxProxydata::load_set(mng,'monticchio_testset',zoo_format = 'zoo', force_file=TRUE)
# Change from yrs BP to yrs AP (i.e. forward instead of backward) time axis for proxytibble
monticchiodata_rev <- rev_time_axis(monticchiodata)
# Change from yrs BP to yrs AP (i.e. forward instead of backward) time axis for zoo
monticchiozoo_rev <- rev_time_axis(monticchiodata$proxy_data[[1]])
# Plot zoo data
plot(monticchiozoo_rev)
plot(monticchiodata_rev$proxy_data[[1]])


paleovar/ptboxproxytools documentation built on June 9, 2025, 1:40 a.m.