Learn R Programming

rsleep (version 1.0.4)

epochs: Split signals into a list of epochs according to an events dataframe or an epoch duration.

Description

Split signals into a list of epochs according to an events dataframe or an epoch duration.

Usage

epochs(signals, sRates, resample = 100, epoch = 30, startTime = 0)

Value

A list of signal chunks

Arguments

signals

A list of numeric vectors containing signals.

sRates

A vector or list of integer values of the signals sample rates.

resample

The sample rate to resample all signals. Defaults to 100.

epoch

Epochs reference. Can be an events dataframe or the number of seconds of each epoch. Defaults to 30.

startTime

The start timestamp of the signal, used to join events to epoch.

Examples

Run this code
epochs(list(c(1:1000),c(1:1000)),100,2)

Run the code above in your browser using DataLab