© 2000

S Programming


Part of the Statistics and Computing book series (SCO)

Table of contents

  1. Front Matter
    Pages i-x
  2. W. N. Venables, B. D. Ripley
    Pages 1-4
  3. W. N. Venables, B. D. Ripley
    Pages 5-38
  4. W. N. Venables, B. D. Ripley
    Pages 39-73
  5. W. N. Venables, B. D. Ripley
    Pages 75-97
  6. W. N. Venables, B. D. Ripley
    Pages 99-121
  7. W. N. Venables, B. D. Ripley
    Pages 123-150
  8. W. N. Venables, B. D. Ripley
    Pages 151-178
  9. W. N. Venables, B. D. Ripley
    Pages 179-203
  10. W. N. Venables, B. D. Ripley
    Pages 205-234
  11. Back Matter
    Pages 235-265

About this book


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 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 used Modern Applied Statistics

with S-PLUS, 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. W.N. Venables is 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 B.D. 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.


FORTRAN Open Source S language S programming S-PLUS Simulation data analysis programming statistical method statistics

Authors and affiliations

  1. 1.CSIRO Marine LaboratoriesClevelandAustralia
  2. 2.University of OxfordOxfordUK

Bibliographic information


From the reviews:


"Let me come right to the point. If you use S at all – either through the S-PLUS commercial software package or its free open software variant, R – get this book. It is a superbly written, indispensable resource to the S language. Whether you merely dabble in S/R (or are contemplating such dabbling) or are a seasoned veteran who uses it extensively, you will find [this book] invaluable…I would be remiss if I did not pay homage to what I consider a most welcome feature of this book: the superb quality of the writing and the remarkable attention to detail by both authors and publisher. V&R write clearly and very concisely; they take great care to explain what needs to be explained, but they do not patronize the reader with trivialities; they use many well chosen examples and code snippets to support their expositions; and they organize and sequence topics logically, and extensively and liberally cross-reference them by page number to help the reader understand how they relate. Finally, V&R frequently take pains to point out lurking software traps and documentation inaccuracies that can plague users. I consider such conscious efforts to mitigate future aggravations for readers a thoughtful courtesy that more software documenters should emulate. I also would like to compliment the publishers on the superb typography and page layout that clearly distinguishes text, code, tables, section headings, and so forth. The editing is also remarkable: I noticed no errors at all! This level of attention to production detail makes the book very easy to either browse or study. I appreciated it very much. In many respects, [this book] could serve as a model for what ought to be the standard in software references. It strikes a careful and effective balance between providing a big picture of the overall language structure and the details necessary to fit the pieces together and make them work…It is written with attention to style and clarity and produced to help the reader grasp the content as easily as possible. Such details matter, and it is a pleasure to give credit where credit is clearly due. S PROGRAMMING should be on every S/R user’s desk next to the computer, and maybe in every software documenter’s library as well."