emgR
overview# install.packages("devtools") if not installed devtools::install_github("https://github.com/ymatts/emgR") #install.packages("~/Dropbox/matsui/git/emgR.tar.gz",repos = NULL,type = "source") 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
id
in first column may indicate one cycle or trialtype
in second column may indicate description of idstart
and end
should be annotated/triggered time in second(f = system.file("extdata","gaitAnno.txt",package = "emgR")) head(read.table(f,header = T,sep="\t"),3)
addAnnotation
function adds indices in raw emg records with annotated timeobj = emgR::addAnnotation(obj,annoFile = f) head(obj$annotation,3)
emgR
order
4 and [5,200]
bandpass filterobj = emgR::btw(obj,order = 4,filtFreq = c(5,200)) obj
obj = emgR::normalize(obj) obj
load("data/cycleTime.rda") head(cycleTime)
stats::spec.pgram()
functionobj = emgR::coherence(obj) obj
files
cohRange
is which frequency range should be consideredfile_path = tempfile() plot(obj,type="coh",files = file_path,cohRange=c(0,100))
knitr::include_graphics(file_path)
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)
plot.it
visualize module structureplot.type
from "member"
or "graph"
plot.type = "graph"
obj = emgR::moduleFinder(obj,plot.it = TRUE,plot.type = "graph")
plot.type = "member"
obj = emgR::moduleFinder(obj,plot.it = TRUE,plot.type = "member")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.