Description Usage Arguments Details Value Author(s) See Also Examples
Functions to check if an object is an ‘emg’ object, or coerce it if possible.
1 2 3 4 5 6 7 8 9 10 |
x |
any R object. |
... |
additional arguments to be passed to methods (such as the samplingrate or the units of the EMG signal). |
as.emg
is a generic function with many methods to coerce an object to an ‘emg’ object.
is.emg
checks if x
is an ‘emg’ object.
as.emg
returns an ‘emg’ object.
is.emg
returns TRUE
if its argument is an ‘emg’ object (that is, has “emg” amongst its classes) and FALSE
otherwise.
J.A. Guerrero jaguerrero@correo.uaa.mx
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Creates 1 sec. of a simulated EMG with only baseline noise
x <- rnorm(1000)
# Coerce a vector into an 'emg' object
emgx <- as.emg(x, sampligrate = 1000)
# Plot the data in emgx
plot(emgx, main = "Synthetic EMG noise")
# Load a data.frame with EMG data
data(emg96627009)
# Coerce a data.frame into an 'emg' object
x <- as.emg(emg96627009)
# Plot the data in x
plot(x, main = "EMG of limb muscles of decorticated cat")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.