powered by
Split long signals into a list of consecutive epochs according to an events dataframe or an epoch duration.
epochs( signals, sRates, resample = max(sRates), epoch = 30, startTime = 0, padding = 0 )
A list of signal chunks
A list of numeric vectors containing signals, or a single vector containing one signal.
A vector or list of integer values of the signals sample rates.
The sample rate to resample all signals. Defaults to to the max of the provided sample rates.
Epochs reference. Can be an events dataframe or the number of seconds of each epoc Defaults to 30.
The start timestamp of the signal, used to join events to epoch.
Number of previous and next epochs to pad the current epoch with. This functionnality is mostly used to enrich deep learning datasets. Defaults to 0.
epochs(list(rep(c(1,2,3,4),100),rep(c(5,6,7,8),100)),4,4,1,padding = 2)
Run the code above in your browser using DataLab