extract_signal: Extract raw signal data from an 'egm' object

View source: R/egm.R

extract_signalR Documentation

Extract raw signal data from an egm object

Description

Raw signal data may be all that is required, particularly when storing or manipulating data, or for example, feeding it into an analytical pipeline. This means the extraneous elements, such as the meta information, may be unnecessary. This function helps to strip away and extract just the signal data itself and channel names.

Usage

extract_signal(object, data_format = c("data.frame", "matrix", "array"), ...)

Arguments

object

An egm object that contains the signal data to be extracted

data_format

A character choice of either data.frame (default), matrix, or array that tells how the data should be structured. Further explanation in the details.

...

Additional arguments to be passed to the function

Details

The options to return the data vary based on need. The data can be extracted as follows:

  • data.frame containing an equal number of rows to the number of samples, with each column named after the recording channel it was derived from. Data frames, as they are columnar by nature, will also include the sample index position.

  • matrix containing an equal number of rows to the number of samples, with each column named after the recording channel it was derived from

  • array containing individual vectors of signal, each named after the channel they were derived from

Value

An object as described by the format option


EGM documentation built on June 22, 2024, 6:53 p.m.