`S Programming'

by W. N. Venables and B. D. Ripley

Springer. ISBN 0-387-98966-8, 2000.

Hardback 232mm × 155mm, x+264 pages, US price $59.95

This is a companion to the Third Edition of Modern Applied Statistics with S-PLUS. It was published on 12 April 2000.

On-line material:
Description Contents Scripts and complements
Errata Contact authors Publisher's Web Sites

There are mirrors of this material at Oxford, Sydney, StatLib (Pittsburgh) and Wisconsin.


S is a high-level language for manipulating, analysing and displaying data. It forms the basis of two highly acclaimed and widely used data analysis software systems, the commercial S-PLUS® and the Open Source R. This book provides an in-depth guide to writing software in the S language under either or both of those systems. It is intended for readers who have some acquaintance with the S language and want to know more about how to use it more effectively, for example to build re-usable tools for streamlining routine data analysis or to implement new statistical methods.

One of the outstanding strengths of the S language is the ease with which it can be extended by users. S is a functional language, and functions written by users are first-class objects treated in the same way as functions provided by the system. S code is eminently readable and so a good way to document precisely what algorithms were used, and as much of the implementations are themselves written in S they can be studied as models and to understand their subtleties. The current implementations also provide easy ways for S functions to call compiled code written in C, Fortran and similar languages; this is documented here in depth.

Increasingly S is being used for statistical or graphical analysis within larger software systems or for whole vertical-market applications. The interface facilities are most developed on Windows® and these are covered with worked examples.

The authors have written the widely adopted Modern Applied Statistics with S-PLUS for Springer, now in its third edition, and several software libraries that enhance S-PLUS and R; these and the examples used in both books are available on the Internet.

Dr Venables is now a senior Statistician with the CSIRO/CMIS Environmetrics Project in Australia, having been at the Department of Statistics, University of Adelaide for many years previously. Professor Ripley holds the Chair of Applied Statistics at the University of Oxford, and is the author of four other books on spatial statistics, simulation, pattern recognition and neural networks. Both authors are known and respected throughout the international S and R communities, for their books, workshops, short courses, freely available software and through their extensive contributions to the S-news and R mailing lists.


  1. Introduction
  2. The S language: Syntax and semantics
  3. The S language: Advanced aspects
  4. Classes
  5. New-style classes
  6. Using compiled code
  7. General strategies and extended examples
  8. S software development
  9. Interfaces under Windows


  1. Compiling and loading code
  2. The interactive environment
  3. BATCH operation

Scripts and Complements

Scripts for the S, R and C used in the book are available as Sprog.tar.gz (a gzipped tar file) and Sprog.zip (a zip file in the INFO-ZIP projects' format). Unpack these by one of

       gzip -dc Sprog.tar.gz | tar xvf -
       tar zxvf Sprog.tar.gz                     (GNU tar only)
       unzip Sprog.zip
which will unzip the material into one directory for each chapter (and appA for Appendix A).

We will produce on-line complements updating the book for new developments in S-PLUS and R as they occur. There is an initial complement (describing S-PLUS 6.x, including under Windows, R 1.2.x, how to program `Life' and how use other Windows compilers), in gzipped postscript or PDF. Those complements mention the Perl file S2html.


An errata list for the first printing, including updates for changes to R and new features of S-PLUS 6.x.

An errata list for the second printing.

An errata list for the third printing.


Dr W. N. Venables
CMIS Environmetrics Project
PO Box 120,
Cleveland, Qld, 4163

Email: Bill.Venables@cmis.csiro.au

Professor B. D. Ripley
Department of Statistics
1 South Parks Road
Oxford OX1 3TG

Email: ripley@stats.ox.ac.uk


Links are provided to Springer's home pages in Germany and the USA, and the preview page for this book.

Last edited on Tuesday 26 August 2003 by Brian Ripley ripley@stats.ox.ac.uk