Package for Plotting Categorical Longitudinal and Time-Series Data

Methods for plotting categorical longitudinal and time-series data by mapping individuals to the vertical space (each horizontal line represents a participant), time (or repeated measures) to the horizontal space, categorical (or discrete) states as facets using color or shade, and events to points using plotting characters. Sorting individuals in the vertical space and (or) stratifying them by groups can reveal patterns in the changes over time.


Changes in Version 0.17 * Added options for handling the legend outside the margins and suppressing the legend above the plot * Added handling for factor input (which is converted to numeric integers) * Default y-axis label moved closer to the plot unless there is grouping * Default for groupBuffer in longCatPlot changed to 0 * Changed default handling of y-axis label to include sample size * Removed restriction to 9 categories (a warning is issued) * Added options for controlling the length of terminal line segments with the 'endt' option of the longCat() function. This also allows for individually varying times of observations with known end times (i.e., the times matrix has one more column than the data matrix, see 'endt'). * Expanded the examples to illustrate the use of the RColorBrewer and colorSpace packages (these are shown in the documentation but not run when using example(colChoose))

Changes in Version 0.16 * Corrected a bug in missing data handling for the group variable in version 0.13 * Added error message for attempts to sort a sorted lc object; a code example is printed for correct approach to multiple sorts * Added error message for missing values on customSort input to sorter() * Added funder information to author field in DESCRIPTION file * Added a not run example for longCatPlot showing how to speed up plot production for larger data sets

Changes in Version 0.15 * Explores automatic selection of lwd, with the option to weight lwd via the sampling weights * Results: the minimum lwd is too small to make this useful, V.15 not published, branch from .13 to .16

Changes in Version 0.14 * Explores the use of seriation package instead of or with sorter(); seriation is far too slow, v0.14 will not be released, revert to 0.13 and jump to 0.15.

Changes in Version 0.13 * Added utility for saving sorting order and ID variables

Changes in Version 0.12 * Removed restriction to 9 categories (not released, changes not perpetuated in version .13)

Original Version 0.11

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.31 by Stephen Tueller, 5 months ago

Browse source code at

Authors: Stephen Tueller. Funded by the National Institute on Drug Abuse (NIDA) Award number 1R03DA030850, the National Institute on Alcohol Abuse and Alcoholism (NIAAA) Award Number R03 AA019775, and the National Institute of Justice Award Number 2011-RY-BX-0003.

Documentation:   PDF Manual  

GPL (>= 3) license

Depends on methods, stats

Suggests RColorBrewer, colorspace, MASS, ggplot2

See at CRAN