CompressRecord: Compress a record

View source: R/CompressRecord.R

CompressRecordR Documentation

Compress a record

Description

Linearly interpolate given data onto a compressed depth scale.

Usage

CompressRecord(depth, rec, stretch)

Arguments

depth

numeric vector woth the original depth scale of rec.

rec

numeric vector of proxy values; must be of same length as depth.

stretch

numeric value of the amount of compression of the original depth scale in the same units as depth.

Details

The compressed depth scale is calculated by reducing the maximum depth of depth by the amount of stretch and dividing the new depth scale into n equal bins, where n is the length of depth. The proxy values on the compressed depth scale are found by linear interpolation of the original values using approx.

Value

a list with two components:

  • depth: numeric vector of length depth with the compressed depth scale.

  • rec: numeric vector of length depth with the proxy values on the compressed depth scale.

Author(s)

Thomas Münch

See Also

approx


EarthSystemDiagnostics/TrenchR documentation built on Sept. 2, 2023, 3:44 a.m.