extractchannel: Extracts a single channel from a multichannel 'emg' object

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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")


Search within the biosignalEMG package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.