knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
emgR
overview# install.packages("devtools") if not installed devtools::install_github("https://github.com/ymatts/emgR") library(emgR)
data(emg) head(emg,3)
emgList
is a method for constructing emgR objectemgList
object is simply a list
data structurett = emg$Time # Time record xx = emg[,-1] # EMG record obj = emgR::emgList(x = xx,t = tt) obj
emgR
order
4 and [5,200]
bandpass filterobj = emgR::btw(obj,order = 4,filtFreq = c(5,200)) obj
obj = emgR::normalize(obj) obj
stats::spec.pgram()
functionobj = emgR::coherence(obj) obj
files
cohRange
is which frequency range should be consideredplot(obj,type="coh",files = "myCoh.jpg",cohRange=c(0,100))
knitr::include_graphics("~/Dropbox/matsui/git/emgR/myCoh.jpg")
cohRange
by vector.plot.it
argumentobj = emgR::aggrCoh(obj,cohRange = c(15,20),plot.it = FALSE) obj
obj = emgR::aggrCoh(obj,cohRange = c(15,20),plot.it = TRUE)
mode="weighted"
mode="bin"
thres
argumentthres
is 0.25
plot.it
argument.obj = emgR::cohNet(obj,mode = "bin",thres = 0.25,plot.it = FALSE)
obj = emgR::cohNet(obj,mode = "bin",thres = 0.25,plot.it = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.