integration: Integration of an EMG

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

View source: R/integration.R

Description

Computes the integrated EMG, with or without reset points.

Usage

1
2
integration(data, channel, reset = FALSE, reset.criteria = c("samples", "time", "value"),
   vreset, units, data.name)

Arguments

data

an ‘emg’ object, usually rectified, a moving averaged rectified EMG or a computed envelope of an EMG.

channel

in case of multi-channel data, channel is the specific channel to be considered by the procedure. 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).

reset, reset.criteria

if reset=TRUE, The integrated signal is reset to zero at a regular number of samples (reset.criteria="samples"), at regular intervals of time (reset.criteria="time") or when a voltage level is reached (reset.criteria="value").

vreset

a value to determine the reset points in an EMG, see Details.

units

a character vector specifying the units (usually "mV.s") of the integrated EMG 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.

Details

If reset=FALSE, the integrated EMG is the cumulative sum of the values in data. If reset=TRUE, the cumulative sum is reset to zero at some points, which are determined based on the value of reset.criteria and vreset:

Value

An ‘iemg’ object storing the integrated EMG.

Author(s)

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

References

Winter D.A., Rau G., Kadefors R., Broman H., Deluca C.J. (1980) Units, Terms, and Sandards in the Reporting of EMG Research: A Report by the AdHoc Committee of the International Society of Electrophysiology and Kinesiology.

See Also

iemg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# change graphical parameters to show multiple plots
op <- par(mfrow = c(2, 2))

# Simulate 5 seconds of an EMG
emgx <- syntheticemg(n.length.out = 5000, on.sd = 1, on.duration.mean = 350, 
    on.duration.sd = 10, off.sd = 0.05, off.duration.mean = 300, off.duration.sd = 20, 
    on.mode.pos = 0.75, shape.factor = 0.5, samplingrate = 1000, units = "mV", 
    data.name = "Synthetic EMG")
plot(emgx, main = "Synthetic EMG")

# Full-wave rectified EMG
emgr <- rectification(emgx, rtype = "fullwave")

# Integration of the full-wave rectified EMG without reset points
emgi1 <- integration(emgr, reset = FALSE)
plot(emgi1, main = "Integrated EMG (no reset)")

# Integration of the full-wave rectified EMG with reset points every
# 200 samples
emgi2 <- integration(emgr, reset = TRUE, reset.criteria = "samples", vreset = 200)
plot(emgi2, main = "Integrated EMG (with reset)")

# Integration of the full-wave rectified EMG with a reset point each
# time the value 200 is reached
emgi3 <- integration(emgr, reset = TRUE, reset.criteria = "value", vreset = 200)
plot(emgi3, main = "Integrated EMG (with reset)")

# reset graphical parameters
par(op)

Example output



biosignalEMG documentation built on May 2, 2019, 12:07 p.m.