Skip to contents

Assigns types (EEG, EMG, EOG, etc.) to channels.

Usage

setChannelTypes(x, types)

Arguments

x

A PhysioExperiment object.

types

Named character vector or list mapping channel names/indices to types. If unnamed, applies types in order.

Value

Modified PhysioExperiment object.

References

Oostenveld R, Fries P, Maris E, Schoffelen JM (2011). "FieldTrip: Open source software for advanced analysis of MEG, EEG, and invasive electrophysiological data." Computational Intelligence and Neuroscience, 2011, 156869.

See also

getChannelsByType for querying channels by type, channelInfo for full channel metadata, setChannelUnits for assigning physical units

Examples

pe <- PhysioExperiment(
  assays = list(raw = matrix(rnorm(400), nrow = 100, ncol = 4)),
  colData = S4Vectors::DataFrame(label = c("Fz", "EOG1", "EMG1", "Oz")),
  samplingRate = 100
)

# Set all channels to same type
pe <- setChannelTypes(pe, "EEG")

# Set specific channel types by name
pe <- setChannelTypes(pe, c(EOG1 = "EOG", EMG1 = "EMG"))