Description Usage Arguments Value Author(s) Examples
Removes low frequency drifts from data.
1 | highPass(x, freq, tr)
|
x |
Numeric matrix or vector. If a vector is supplied it will be coerced to a matrix. |
freq |
This is the cutoff frequency. It is specified in seconds for comparability with SPM. |
tr |
This is the time between samples(or the TR for fMRI data.) |
A high pass filtered matrix will always be returned.
Tim Tierney
1 2 3 4 5 6 7 8 9 | t<-seq(1,300)
y<-cos(.01*pi*t)+.1*cos(.2*pi*t) ## time series with low frequency drift
plot(t,y,type="l",col="red",lwd=5) ## plot it
hp.y<-highPass(y,128,2.16) ## filter it at 128s (like in SPM) with a tr of 2.16
lines(t,hp.y,col="blue",lwd=5) ## result has no drift
legend(x="topright", ## Create the Legend
legend=c("Raw Signal",
"Highpass Filtered"),
col=c("red","blue"),lwd=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.