Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/extractchannel.R
Extracts a specific channel from a multichannel ‘emg’ object.
1 | extractchannel(data, channel, data.name)
|
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.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 |
if channel
is a single channel ‘emg’ object, that single channel is returned as the output.
an ‘emg’ object containing a single channel.
J.A. Guerrero jaguerrero@correo.uaa.mx
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.