Description Usage Arguments See Also Examples
running function (default median absolute deviation)
1 |
aref |
data array |
k |
window in data points, default 300 |
func |
default med but can be any function taking a vector and returning a summary |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | x = rnorm(500)
x = c(x,rnorm(1000,3,2))
x = c(x,runif(1000,4,6))
y = runFun(x,k=51,func=mad)
hist(y)#[500:490]
y2 = runFun(x,k=51,func=median)
plot(x,pch="*")
lines(y2,col=2,lwd=3)
lines(y2+y,col=3,lwd=3)
lines(y2-y,col=3,lwd=3)
tic = runFun(x,k=51,func=function(x,...){mean(x)})
plot(x,pch=".")
abline(h=0,col=2)
lines(tic,col=3,lwd=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.