Aggregate data from a timeseries object into the same timeline through binning.

binTs(
  TS,
  time.var = "ageEnsemble",
  bin.vec,
  bin.fun = mean,
  max.ens = 1000,
  na.col.rm = TRUE
)

Arguments

TS

LiPD timeseries object See http://nickmckay.github.io/LiPD-utilities/r/index.html#what-is-a-time-series

time.var

specify the time variable to bin (default = "ageEnsemble")

bin.vec

vector of bin edges for describing where to bin

bin.fun

function to use during binning (mean, sd, and sum all work)

max.ens

Maximum number of ensemble members.

na.col.rm

Remove columns that are all NAs? (TRUE or FALSE)

Value

A list of binned years and values.

See also

Other bin: alignTimeseriesBin(), bin(), bin2d(), binEns()

Author

Nick McKay