paleodata_multiprocessing: Wrapper function to apply different processing chains to an...

View source: R/Proxytools_tools.R

paleodata_multiprocessingR Documentation

Wrapper function to apply different processing chains to an irregular time series object

Description

Multiple versions of the form: input data –> filtering –> interpolation –> time restriction (windowing) –> transformation –> signal extraction –> output data

Usage

paleodata_multiprocessing(
  xin,
  processing_name,
  filtering = rep(FALSE, times = length(processing_name)),
  filter_type = NULL,
  filter_scales = NULL,
  detr_scale = NULL,
  smooth_scale = NULL,
  interpolation = rep(FALSE, times = length(processing_name)),
  interpolation_type = NULL,
  interpolation_dates = NULL,
  windowing = rep(FALSE, times = length(processing_name)),
  start_date = NULL,
  end_date = NULL,
  transformation = rep(FALSE, times = length(processing_name)),
  transformation_type = NULL,
  signal_extraction = rep(FALSE, times = length(processing_name)),
  signal_type = NULL,
  signal_components = NA
)

Arguments

xin

Irregular time series object ('zoo::zoo'), xin can be multivariate

processing_name

Names of the different processing applications

filtering

Vector of logicals: should filtering be applied

filter_type

Vector of parameters for filtering (see paleodata_filtering)

filter_scales

Vector of parameters for filtering (see paleodata_filtering)

detr_scale

Vector of parameters for filtering (see paleodata_filtering)

smooth_scale

Vector of parameters for filtering (see paleodata_filtering)

interpolation

Vector of logicals: should interpolation be applied?

interpolation_type

Vector of parameters for interpolation (see paleodata_interpolation)

interpolation_dates

Vector of parameters for interpolation (see paleodata_interpolation)

windowing

Vector of logicals: should restriction to time window be applied?

start_date

Vector of parameters for windowing (see paleodata_windowing)

end_date

Vector of parameters for windowing (see paleodata_windowing)

transformation

Vector of logicals: should transformation be applied?

transformation_type

Vector of parameters for transformation (see paleodata_transformation)

signal_extraction

Vector of logicals: should signal extraction be applied?

signal_type

Vector of parameters for signal extraction (see paleodata_signal_extraction)

signal_components

Vector of parameters for signal extraction (see paleodata_signal_extraction)

Value

List of processed signals, provided as list of irregular time series objects ('zoo::zoo'). Fields '$data' contain the processed signals.

See Also

paleodata_processing (from 'PTBoxProxytools') for wrapper of individual processing chains

paleodata_filtering (from 'PTBoxProxytools') for filtering

paleodata_interpolation (from 'PTBoxProxytools') for interpolation

paleodata_windowing (from 'PTBoxProxytools') for time period restriction

paleodata_transformation (from 'PTBoxProxytools') for transformation

paleodata_signal_extraction (from 'PTBoxProxytools') for signal extraction

Examples

#' # Load ice core example data
library(PTBoxProxydata)
mng <- ProxyDataManager()
icecoredata <- load_set(mng,'icecore_testset',zoo_format = 'zoo')
# Step-by-step processing of ice core data in multiple different forms (here, smooting, detrending, and bandpass filtering is applied at the same time): 1) Smooth / Detrend / Bandpass filter, 2) Interpolate to common time axis, 3) Restrict to 30-60ka BP, 4) Normalize, 5) Compute 1. PC
icecoredata_processed <- paleodata_multiprocessing(xin = icecoredata$proxy_data[[1]], processing_name = c("Smoothing","Detrending","Bandpass filtering"),
                                                           filtering = rep(TRUE,times=3), filter_type = c("smooth","detrend","bandpass"), detr_scale = rep(1000,times=3), smooth_scale = rep(10000,times=3), filter_scales = data.frame(lower=rep(1000,times=3), upper=rep(10000,times=3)),
                                                           interpolation = rep(TRUE,times=3), interpolation_type = rep("spectral",times=3), interpolation_dates = list(seq(20000,70000,by=100),seq(20000,70000,by=100),seq(20000,70000,by=100)),
                                                           windowing = rep(TRUE,times=3), start_date = rep(30000,times=3), end_date = rep(60000,times=3),
                                                           transformation = rep(TRUE,times=3), transformation_type = rep("normalize",times=3),
                                                           signal_extraction = rep(TRUE,times=3), signal_type = rep("pca",times=3), signal_components = rep(1,times=3))
# Plotting
plot(icecoredata_processed[[1]]$data)
plot(icecoredata_processed[[2]]$data)
plot(icecoredata_processed[[3]]$data)


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