@param x
@param y
@param start
@param end
@param by
panel.loess.fill <- function(x, y, by = "day", start = min(x), end = max(x), ...){
xx <- seq.Date( start, end, by= by )
yy <- numeric( length(xx) )
not.zero <- xx %in% x
if( any( not.zero ) ) yy[ not.zero ] <- y
loess.out <- loess( as.numeric(yy) ~ as.numeric(xx) )
panel.lines( xx, predict( loess.out), ... )
}
@param start
@param end
@param col
@param lwd
@param ...
panel.yearlines <- function(
start = 1998, end = 2010,
lwd = 0.5, col = "gray", ... ){
firstday <- function( year ){
as.Date( sprintf( "%d-01-01", year ) )
}
years <- firstday( seq.int( start, end ) )
panel.abline( v = years, col = col, lwd = lwd, ... )
}