simpleBinTs: simple binning of a lipd_ts object paleoData_values using a...

View source: R/bin.R

simpleBinTsR Documentation

simple binning of a lipd_ts object paleoData_values using a nearest neighbor approach

Description

simple binning of a lipd_ts object paleoData_values using a nearest neighbor approach

Usage

simpleBinTs(
  ts,
  binvec,
  ageVar = "age",
  spread = TRUE,
  spreadBy = abs(mean(diff(binvec)))/10,
  spreadMax = as.numeric(abs(stats::quantile(abs(diff(sort(ts[[ageVar]]))), probs = 0.75,
    na.rm = TRUE))),
  gaussianizeInput = FALSE,
  alignInterpDirection = TRUE,
  scope = "climate"
)

Arguments

ts

a lipd_ts object

binvec

vector of time boundaries over which to bin

ageVar

specify the name the time variable (typically 'age' or 'year')

spread

should values be interpolated between bins? (TRUE/FALSE)

spreadBy

if newAge is not supplied, what is the desired resolution of the spread values? If NA, the minimum age gap divided by 5 will be used

spreadMax

a limit to how many years a value can be interpolated across (given in years). If NA, no limit is imposed.

gaussianizeInput

Force values to gaussian distribution before analysis (TRUE/FALSE)

alignInterpDirection

multiply values by -1 if scope_interpDirection == negative (TRUE/FALSE)

scope

the scope of the project (typically "climate" (default) or "isotope")

Value

numeric vector of values of equal length to binvec


nickmckay/compositeR documentation built on Aug. 16, 2024, 5:37 p.m.