-year_hist <- function (t, year, from, to, max, type="week", title="Histogram for Tickets in")
+year_hist <- function (t, year, from, to, max, type="week", title="Histogram for Tickets in", fmt="%b-%d")
hbreaks<-unclass(as.POSIXct(dates))
h<-hist(t$start, breaks=hbreaks, plot=FALSE)
main<-sprintf(paste(title, "%s: MEAN %s\n"), year, mean(h$counts))
print(main);
hbreaks<-unclass(as.POSIXct(dates))
h<-hist(t$start, breaks=hbreaks, plot=FALSE)
main<-sprintf(paste(title, "%s: MEAN %s\n"), year, mean(h$counts))
print(main);
}
year_hist_unique <- function (t, year, from, to, max, type="week", title="Histogram for Tickets in")
}
year_hist_unique <- function (t, year, from, to, max, type="week", title="Histogram for Tickets in")
-abline_at_date <- function (date, col='black', lty=1, format="%Y-%m-%d")
+abline_at_date <- function (date, col='black', lty=1, format="%Y-%m-%d", height=0)
- abline(v=ts, col=col, lty=lty)
+ if ( height == 0 )
+ {
+ abline(v=ts, col=col, lty=lty)
+ } else {
+ lines(c(ts,ts),c(0,height), col=col, lty=lty)
+ }