numbering timestamps according to event information
hsEventNumber(tstamps, events, eventNumbers = 1:nrow(events),
commaSeparated = FALSE)
vector of timestamps
event information as returned by hsEvents
optional vector of event numbers with as many elements as there are rows in tstamps. Default: 1:nrow(events)
if there are timestamps taht belong to more than one event, the default behaviour (commaSeparated = FALSE) of this function is to return a list with each list element being a vector of integer numbers representing the numbers of events to which the corresponding timestamps belong. With commaSeparated = TRUE, the list of event numbers is converted into a vector of character where each element is a text string in which more than one event number are separated by a comma. E.g. c("1", "1,2", "2") would be returned if the first timestamp belongs to event 1, the second to both event 1 and 2, and the third to event 2.