extractchannel {biosignalEMG}R Documentation

Extracts a single channel from a multichannel 'emg' object

Description

Extracts a specific channel from a multichannel ‘emg’ object.

Usage

extractchannel(data, channel, data.name)

Arguments

data

an ‘emg’ object.

channel

the specific channel to be extracted. Possible values: a character vector specifying the name of the channel to be considered (case sensitive) or a numeric value specifying the channel to be considered (number of column in data).

data.name

a string specifying the name of the variable which will appears on the plots. If empty or not provided is taken from the object given as data (a channel name in data, if it exists).

Details

if channel is a single channel ‘emg’ object, that single channel is returned as the output.

Value

an ‘emg’ object containing a single channel.

Author(s)

J.A. Guerrero jaguerrero@correo.uaa.mx

See Also

emg, as.emg

Examples

# Load a data.frame with EMG data
data(emg96627009)
# Coerce a data.frame into an 'emg' object
x <- as.emg(emg96627009)

# Extract the second channel in x
y <- extractchannel(x, 2)
# Plot the data in y
plot(y, main = "Second channel of emg96627009")

# Extract the channel 'ENG-FDL' in x (third channel)
z <- extractchannel(x, "ENG-FDL")
# Plot the data in z
plot(z, main = "Third channel of emg96627009")

[Package biosignalEMG version 2.1.0 Index]