paleodata_windowing: Extract all samples in a given time period from an irregular...

View source: R/Proxytools_tools.R

paleodata_windowingR Documentation

Extract all samples in a given time period from an irregular time series

Description

Extract all samples in a given time period from an irregular time series

Usage

paleodata_windowing(xin, start_date, end_date)

Arguments

xin

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

start_date

Lower end of time window (included in the output 'zoo::zoo')

end_date

Upper end of time window (included in the output 'zoo::zoo')

Value

Proxytibble with proxy data in 'zoo::zoo' format or irregular time series object ('zoo::zoo') containing only the samples in the defined window

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)
# Reduce to samples between 30ka BP and 60ka BP
monticchiodata <- paleodata_windowing(monticchiodata,30000,60000)
# Extract zoo with samples from 30ka BP to 40ka BP
monticchiozoo <- paleodata_windowing(monticchiodata$proxy_data[[1]],30000,40000)
# Plot zoo data
plot(monticchiozoo)


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