function that puts data into appropriate bins, based on the time and the binning vector the bin vector describes the edges of the bins

bin(time, values, bin.vec, bin.fun = mean)

Arguments

time

vector of time

values

vector of values to bin

bin.vec

vector of bin edges for describing where to bin

bin.fun

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

Value

A data.frame of (x) binned time, and (y) binned values

See also

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

Author

Nick McKay