Blame | Last modification | View Log | Download | RSS feed
This directory contains code and help for an R port of CHRON, an S-PLUSpackage for working with chronological objects (times and dates).The original was downloaded fromhttp://netlib.bell-labs.com/cm/ms/departments/sia/project/misc/chron.htmlSee the file `PORTING' for the changes made for the R version.See `Y2K' for information on a recent year 2000 update.The original `README' is appended below. See `COPYING' for copyrightinformation.KH <Kurt.Hornik@ci.tuwien.ac.at> 1998/02/13*** Original README **************************************************This directory contains S functions to work with chron objects. Theseobjects handle dates and times. For the time being issues relating totime-zones, daylight savings time, etc. are being put aside.NOTE: To use chron objects you need library(statistics) in S.In S-PLUS you need library(chron, first = T)For source and details, seehttp://cm.bell-labs.com/ms/departments/sia/dj/chron.htmlThe following methods and functions are available for chron objects:function description---------- -----------------------------------------------------chron createas a chron object; it takes either julian datesor character dates. See help(chron).dates creates a dates object (simply invokes chron)times creates a times object (simply inoveks chron)as.numeric returns a vector of julian dates + fraction of day (times)as.character returns a character representation of dates/timesis.naprint print dates and times nicelyplot plot with time axishist histogram with time axisidentify identify points in scatterplotlines, points add lines/pointsaxis.times add time axis to plotcut make ordered factors from dates (e.g., by month, week)seq generate a sequence of datesmin, max, numeric summariesrange, summarysort, ordertrunc, ceiling,round, signif,diff[.times selects, e.g., dates[ dates > "02/20/92" ], orlathe.date[ start.date > min(scan.date) ][<-.times replacementc combines chronsdays, months, extact day, month, year, quarter number, etc.years, quartersweekdays,hours, minutes,secondsis.holidayis.weekendmonth.day.year date conversion (modified from the S "blue" book)julian,day.of.weekUNDOCUMENTED 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 cell2. 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 tospecify the chron object first, i.e., c("03/28/90", x) does notdispath the c.dates() method.