Skip to contents

Creates a new PhysioExperiment without specified channels.

Usage

dropChannels(x, channels)

Arguments

x

A PhysioExperiment object.

channels

Integer indices or character names of channels to drop.

Value

A new PhysioExperiment without specified channels.

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

pickChannels for keeping specific channels, getChannelsByType for finding channels by type, nChannels for channel count

Examples

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

# Drop by index
pe_dropped <- dropChannels(pe, 1)
nChannels(pe_dropped)  # 3
#> [1] 3

# Drop by name
pe_dropped <- dropChannels(pe, c("Fz", "Oz"))