window_epochs: Moving window epoch generator

View source: R/toporanga.R

window_epochsR Documentation

Moving window epoch generator

Description

Splits the event log into cumulative epochs, i.e., starting from the start up to selected number of final points. Returns an object which has to be fed into epochs argument of toporanga function.

Usage

window_epochs(n, window, t)

Arguments

n

number of epochs. Silently capped to the number of events, if larger. Inferred from window if missing.

window

size of the moving window; if t is given, in the units of time, otherwise in event count. Set to range/n if not given. Larger windows are just made overlapping.

t

optional event times, vector of a same length and order as the event log given to toporanga function. When given, epochs will be generated based on equal-time breaks not equal-event-number breaks.

Value

A special function that can be passed to the epochs argument of toporanga function.

Note

If time is not given, event log must be sorted; otherwise, epochs will not make any sense.


toporanga documentation built on Aug. 8, 2025, 6:15 p.m.