Chron S library Chron Library


S chron library

This library defines time variables in terms of classes of chronological objects and provides a natural means of integrating time into data analysis. This approach is based on the object-oriented paradigm and includes methods for date arithmetic and logical operations, graphics, data reduction, printing, and seamless integration with existing statistical modeling software.

This is the original implementation (except for a few bug fixes) as documented in Chronological Objects for Data Analysis by David A. James and Daryl Pregibon, Proceedings of the 25th Symposium of the Interface, 1993. A Portable Document Format (PDF) version can also be found here, viewable with the freely available Acrobat Reader.

S-PLUS has incorporated this software (with some modifications of their own) as an unsupported library.

Distribution

The chron library is available here as a gzipped tar file.

Installation

To install in the current directory, gunzip, untar, and (optionally) run the shell script install.chron or follow the instructions there.

Note: The instructions were written primarily for the AT&T versions of S, and they may be a bit outdated now.

For Splus type:

  SCMD=Splus	export SCMD
Run the shell (/bin/sh) script "intall.chron"; use one of the following invocations (see the NOTES for details):
  /bin/sh install.chron      # if you don't want to compile C
  /bin/sh install.chron -d   # if you want to use dyn.load()
or	
  /bin/sh install.chron -s   # if you want a static load of C code

NOTES:

  1. The chron functions require string manipulations that can be done either with unix tools (tr, awk, etc) or in C (faster); if you don't want to be bothered compiling C use the first invocation above, otherwise you'll have to decide whether to have an object file that can be dynamically loaded by S or a static load of S. As a rule of thumb, Splus supports dynamic loading on most UNIX platforms, AT&T's S does not.
  2. For dyn.load, make sure the makefile "dyn.load.mk" has the appropriate value for the CFLAGS macro.

The following files are included:

  README	
  ALL.FUNCTIONS	# all S functions in source format (ascii)
  install.chron	# simple shell (sh) script to install everything
  *.d		# various help files
  strings.inUX	# S string functions that call UNIX (awk, tr, etc)
  strings.inC	# S string functions that call C
  chron_strs.c	# some string manipulation functions in C
  dyn.load.mk	# makefile for compiling dyn.load C code

Some functions have been elevated to generic: e.g., cut() now simply calls UseMethod("cut") and the current cut() was rename cut.defult(). The following 7 functions are now generic: cut(), diff(), format(), hist(), mean(), quantile(), and seq(). Warning messages regarding redefining these functions may be ignored.


David A James
700 Mountain Ave
Room 2C-253
Murray Hill, NJ 07974
(908) 582-3082