I'm having difficulty finding the syntax to use to specify the beginning and ending dates for the x-axis while plotting a zoo object. I thought that I had seen a message on this list that used start=as.Date("...") end=as.Date("..."), but I cannot find that message. I've tried ?plot, ?plotxy, ?plot.zoo, and Sarkar's lattice book.
I am trying to plot the time series for 'Burns Mg' generated by:
sapply(names(z), function(nm) range(time(na.omit(z[, nm]))), simplify = FALSE)
$`Burns Mg`[1] "1994-01-20" "2009-11-11" This is a typical result of my trial-and-error approach:
plot(z[, $'Burns Mg'], range(time(start = as.Date("1994-01-20"), end = as.Date("2009-11-11"))))
Error in is.matrix(x) : 'x' is missing Please point me to documentation on specifying TIA, Rich ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.