pretreatment_data: Pre-process data by re-sampling all columns.

View source: R/pretreatment_data.R

pretreatment_dataR Documentation

Pre-process data by re-sampling all columns.

Description

Uses the tapas::pretreatment() function to virtually re-sample time series at equal sampling intervals.

Usage

pretreatment_data(
  series = NULL,
  out = "accI",
  interp_missing = TRUE,
  series.name = NA,
  first = NULL,
  last = NULL,
  yrInterp = NULL
)

Arguments

series

A matrix with the following first columns: c("CmTop", "CmBot", "AgeTop", "AgeBot", "Volume") and additional columns with the data which should be resampled.

out

Desired return value:

"accI"

the function returns resampled accumulation rates

"conI"

the function returns resampled concentrations

"countI"

the function returns resampled counts

interp_missing

Logical. Specifies whether the function interpolates missing values. By default interp_missing = TRUE. Missing values are identified when the value of a variable is equal to -999 or NA, or when the sample Volume = 0.

series.name

A string defining typically the site name. Defaults to NA.

first, last

Age boundaries of the resampled time serie. If unspecified (first=NULL and last=NULL), then resampling is done over the entire sequence, from min(series$AgeTop) to max(series$AgeBot).

yrInterp

Resolution of the resampled timeseries.

Value

A list with the resampled (binned) data according to out parameter.

Author(s)

Walter Finsinger

Examples

co <- tapas::co_char_data
co_i <- tapas::pretreatment_data(co)


wfinsinger/tapas documentation built on Aug. 22, 2024, 4:28 a.m.