R/SEMextract.R

Defines functions SEMextract

Documented in SEMextract

#' @export
SEMextract<-function(ts,ons,dur,TR){
semts <- numeric()
for (l in 1:length(ons)){
time <- (ons[l]:(ons[l]+dur))
semts <- c(semts,time)
}
tsf <- ts[sort(semts+6/TR)[which(sort(semts+6/TR)<=nrow(ts))],]
tsf
}

Try the FIAR package in your browser

Any scripts or data that you put into this service are public.

FIAR documentation built on June 5, 2018, 5:03 p.m.