timeBins: Label timestamps as timebins of a given binsize.
Description
Function for calculating timebins.
Usage
timeBins(x, binsize, pos = 0.5)
Value
Anumerical vector of the same size as x with timebin
information.
Arguments
x
Numerical vector with timestamp information.
binsize
Size of the timebin, measured in the same units (often ms)
as x.
pos
Numerical value that determines the label of the binsize
as proportion of the binsize. A value of 0 will provide the minimum
timestamp within the bin as label, a value of 1 will provide the maximum
value within the bin as label. Defaults to 0.5, the center of the bin.