In the lubridate vignette (http://cran.r-project.org/web/packages/lubridate/vignettes/lubridate.html)
setdiff(auckland, jsm) results in ## [1] 2011-06-04 12:00:00 NZST--2011-07-20 NZST But if Hadley's mentor had been called away earlier, say, July 31st, wouldn't the set difference have resulted in two intervals? lubridate shows one: > jsm <- interval(ymd(20110720, tz = "Pacific/Auckland"), ymd(20110731, tz = > "Pacific/Auckland")) > setdiff(auckland, jsm) [1] 2011-07-31 NZST--2011-07-20 NZST i.e., the jsm interval in a negative direction (!). That would not appear to be the intended meaning because the setMethod code for "setdiff" seems to want to trap the two interval result: if (length(makes2)) { stop(paste("Cases", makes2, "result in discontinuous intervals.")) } but maybe I'm hastily misinterpreting the meaning of that check. Thanks in advance for clarification. - Dan PS: (For the setdiff illustration, shouldn't the vignette be asking "For what part of my visit will Chris *not* be there?") ______________________________________________ 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.