SCM

SCM Repository

[latticeextra] Annotation of /pkg/R/panel.tskernel.R
ViewVC logotype

Annotation of /pkg/R/panel.tskernel.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 148 - (view) (download)

1 : felix 148
2 :     panel.tskernel <-
3 :     function(x, y, ...,
4 :     width = NROW(x) %/% 10 + 1, n = 300,
5 :     c = 1, sides = 2, circular = FALSE,
6 :     kern = kernel("daniell", rep(floor((width/sides)/sqrt(c)), c)))
7 :     {
8 :     if (!missing(kern))
9 :     .Deprecated("The 'kern' argument to panel.tskernel is Deprecated. Use simpleSmoothTs directly.")
10 :     if (!missing(y)) {
11 :     x <- as.numeric(x)
12 :     y <- as.numeric(y)
13 :     stopifnot(NCOL(x) == 1)
14 :     if (diff(range(diff(x))) > getOption("ts.eps"))
15 :     stop("'x' should be a regular series")
16 :     x <- ts(y, start = x[1], end = tail(x,1), deltat = diff(x[1:2]))
17 :     }
18 :     x <- as.ts(x)
19 :     s <- simpleSmoothTs(x, width = width, c = c, sides = sides,
20 :     circular = circular, kern = kern, n = n)
21 :     panel.lines(s, ...)
22 :     }

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge