as.EMG: Convert wave of class '"Wave"' to EMG vector of class...

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

Description

Convert wave file into single channel EMG file.

Usage

1
as.EMG(wave, downsample = FALSE, samp.freq)

Arguments

wave

An audio wave of class "Wave" read in by readWave.

downsample

logical. If TRUE (default), then the wave will be downsampled to samp.freq.

samp.freq

numeric. The new sample frequency. Defaults to 11025.

Details

This function takes as imput an audio wave file read in using the readWave function from the tuneR package. The returned wave has print and plot methods. By default, plotting reduces the number of points to 1/10 of the original wave using the downsample parameter.

Value

Vector of class "EMG". Class "EMG" has print and plot methods.

Author(s)

Kevin Middleton (middletonk@missouri.edu)

See Also

readWave

Examples

1
2
3
4
5
wav <- readWave(system.file("extdata",
                            "pulse_1.wav",
                            package = "EMG"))
y <- as.EMG(wav)
str(y)

kmiddleton/EMG documentation built on May 20, 2019, 12:50 p.m.