Skip to contents

Rename channels

Usage

renameChannels(x, old_names, new_names)

Arguments

x

A PhysioExperiment object.

old_names

Character vector of current names.

new_names

Character vector of new names.

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

channelNames for reading channel labels, channelInfo for full channel metadata, pickChannels for subsetting channels

Examples

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

# Rename channels
pe <- renameChannels(pe, c("Fz", "Cz"), c("F3", "C3"))
channelNames(pe)
#> [1] "F3" "C3" "Pz" "Oz"