Learn R Programming

musclesyneRgies (version 1.2.5)

subsetEMG: Subset raw EMG

Description

Subset raw EMG

Usage

subsetEMG(x, cy_max, cy_start = 1)

Value

Object of class EMG with elements:

  • cycles data frame containing cycle timings, with as many columns as many cycle subdivisions are wanted

  • emg data frame containing raw EMG data in columns, first column is time

Arguments

x

Objects of class EMG with elements cycles and emg

cy_max

Maximum number of cycles to be considered

cy_start

From which cycle should the subset begin?

Details

Lists in the correct format can be created with the function rawdata(). The first column of each emg element must be time in the same units as those used for cycles (e.g., [s] or [ms]). For locomotion, thirty cycles are enough for proper synergy extraction (Oliveira et al. 2014).

References

Oliveira, A. S. C., Gizzi, L., Farina, D. & Kersting, U. G. Motor modules of human locomotion: influence of EMG averaging, concatenation, and number of step cycles. Front. Hum. Neurosci. 8, 335 (2014).

Examples

Run this code
# Load some data
data("RAW_DATA")
# Subset example raw data to the first 3 cycles
RAW_DATA_sub <- lapply(
  RAW_DATA,
  function(x) {
    subsetEMG(x,
      cy_max = 3,
      cy_start = 1
    )
  }
)

Run the code above in your browser using DataLab