The code in this library section is not supported by StatSci. This section contains an implementation of chron objects. These objects handle dates and times. For the time being issues relating to time-zones, daylight savings time, etc. are being put aside. The material was developed at AT&T Bell Labs and is experimental. The following methods and functions are available for chron objects: function description ---------- ----------------------------------------------------- chron creates a chron object; it takes either julian dates or character dates. See help(chron). dates creates a dates object (simply invokes chron) times creates a times object (simply inovkes chron) as.numeric returns a vector of julian dates + fraction of day (times) as.character returns a character representation of dates/times is.na print print dates and times nicely plot plot with time axis hist histogram with time axis identify identify points in scatterplot lines, points add lines/points axis.times add time axis to plot cut make ordered factors from dates (e.g., by month, week) seq generate a sequence of dates min, max, numeric summaries range, summary sort, order trunc, ceiling, round, signif, diff [.times selects, e.g., dates[ dates > "02/20/92" ], or lathe.date[ start.date > min(scan.date) ] [<-.times replacement c combines chrons days, months, extract day, month, year, quarter number, etc. years, quarters weekdays, hours, minutes, seconds is.holiday is.weekend month.day.year date conversion (modified from the S "blue" book) julian, day.of.week UNDOCUMENTED FEATURES: ---------------------- 1. Chron matrices can be created from chron objects by using dim() (can't use matrix() nor array()) > dim(x) <- c(20,3) > x[2,3] <- "03/28/90" # replaces a cell 2. The c() method takes anything that can be coerced to chrons: y <- c(x, "03/21/92", 8123) but a bug(?) in the S evaluator makes it necessary to specify the chron object first, i.e., c("03/28/90", x) does not dispath the c.dates() method. For more information on chron objects see: David A. James and Daryl Pregibon, "Chronological Objects in S", AT&T Bell Laboratories Tech. Report (Oct. 1992).