View source: R/Proxytools_tools.R
paleodata_filtering | R Documentation |
Gaussian filtering of irregular time series (using functions from 'nest' package)
paleodata_filtering(
xin,
filter_type,
filter_scales = NULL,
detr_scale = NULL,
smooth_scale = NULL
)
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 |
Proxytibble with filtered proxy data in 'zoo::zoo' format, or filtered irregular time series object ('zoo::zoo')
gaussbandpass (from 'nest') for specifics of the Gaussian smoothing / detrending / bandpass filtering
# 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]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.