S ProgrammingS 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(R) 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 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 ofhe most 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(R) and these are covered with worked examples. The authors have written the widely adopted '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 Environmentrics Project in Autralia, 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 thorughout 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. |
Contents
Syntax and Semantics | 16 |
Advanced Aspects | 50 |
Classes | 77 |
5 | 95 |
Newstyle Classes | 99 |
Using Compiled Code | 123 |
General Strategies and Extended Examples | 151 |
17 | 152 |
30 | 160 |
Other editions - View all
Common terms and phrases
apply args argument array assignment automation bootstrap browser cbSetEnableFlag df character string character vector command compiled code components Computational convolve.c CPU Child Cache CPU Elapsed create cross-validation data frame database debug default defined dialog box dimnames double dyn.load environment error eval evaluation example expression First.lib FLCL for(i formula FORTRAN function call function object function(x graphsheet GUI objects guiCreate("Property help files integer interface lda.formula length Linear Discriminant Analysis loaded loop macros Makefile match matrix memory menu method function mode names newdata normally Note nroff NULL numeric old S engine operations options package plot polynomial prompt result routines S_evaluator s_object S-PLUS script search path SEXP shared library slots specified Splus statistical subset symbol sys.parent UNIX variables vector virtual class Visual Basic Visual C++ Watcom Windows