Example events for testing purposes
exampleEvents(signalWidth = 60, eventSeparationTime = 60 * signalWidth,
from = "2015-06-11", to = "2015-06-12", signalDensity = 0.01, ...)
see description in hsEvents
see description of evtSepTime
in
hsEvents
first day as character string in format yyyy-mm-dd
last day as character string in format yyyy-mm-dd
fraction of all timestamps in a full sequence of
timestamps that are to be selected randomly from the sequence and that are
treated as the "signals" contributing to an event. Default: 0.01, i.e. one
percent of a full sequence of timestamps are randomly selected, ordered and
passed on to hsEvents
that groups these "signal" timestamps
into events
further arguments passed to hsEvents
events <- exampleEvents()
# Calculate event durations manually
dur <- as.integer(events$tEnd) - as.integer(events$tBeg) + hsSigWidth(events)
# All durations should be equal to the durations given in column "dur"
all(dur == events$dur)
#> [1] TRUE
# All pauses after event i should be equal to the pauses before event i+1
all(events$pBefore[-1] == events$pAfter[-nrow(events)])
#> [1] TRUE