paleodata_filtering: Gaussian filtering of irregular time series (using functions...

View source: R/Proxytools_tools.R

paleodata_filteringR Documentation

Gaussian filtering of irregular time series (using functions from 'nest' package)

Description

Gaussian filtering of irregular time series (using functions from 'nest' package)

Usage

paleodata_filtering(
  xin,
  filter_type,
  filter_scales = NULL,
  detr_scale = NULL,
  smooth_scale = NULL
)

Arguments

xin

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

filter_type

Type of filter, either 'detrend' (high pass), 'smooth' (low pass), or 'bandpass' (high and low pass)

filter_scales

Upper and lower cut-off periods for bandpass filtering

detr_scale

Cut-off period for detrending

smooth_scale

Cut-off period for smoothing

Value

Proxytibble with filtered proxy data in 'zoo::zoo' format, or filtered irregular time series object ('zoo::zoo')

See Also

gaussbandpass (from 'nest') for specifics of the Gaussian smoothing / detrending / bandpass filtering

Examples

# Load ice core example data
library(PTBoxProxydata)
mng <- ProxyDataManager()
icecoredata <- load_set(mng,'icecore_testset',zoo_format = 'zoo')
# Detrend the data with 10kyr cutoff timescale
icecoredata_detrended <- paleodata_filtering(icecoredata, 'detrend', detr_scale=10000)
# Smooth the data with 10kyr cutoff timescale
icecoredata_smoothed <- paleodata_filtering(icecoredata, 'smooth', smooth_scale=10000)
# Apply bandpass filter for timescales from 1kyr to 10kyr
icecoredata_filtered <- paleodata_filtering(icecoredata, 'bandpass', filter_scales=data.frame(lower=1000,upper=10000))
# Plot results
plot(icecoredata_detrended$proxy_data[[1]])
plot(icecoredata_smoothed$proxy_data[[1]])
plot(icecoredata_filtered$proxy_data[[1]])


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