Programming in S

  • W. N. Venables
  • B. D. Ripley
Part of the Statistics and Computing book series (SCO)


The S language is both an interactive language and a language for adding new functions to the S-PLUS system. It is a complete programming language with control structures, recursion and a useful variety of data types. The S-PLUS environment provides many functions to handle standard operations, but most users need occasionally to write new functions. This chapter is concerned with designing, writing, testing and correcting your own S functions.


Data Frame Character String Search Path Formal Argument Actual Argument 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    All three functions were introduced in S-PLUS 3.3.Google Scholar
  2. 2.
    Note that we are using etc . to denote an indefinite number of similar items, as “ ... “ is an allowable literal argument with a special meaning. We always use four dots when indicating an omission.Google Scholar
  3. 3.
    Readers wishing to work through this example at the keyboard as it develops over the rest of this section may wish to review briefly the section on editing functions, Section 4.5 on pages 139f.Google Scholar
  4. 4.
    There are some S-PLUS student licences where dynamic loading of C and FORTRAN routines is not supported and some combinations of version and platform on which the facility is rather limited.Google Scholar

Copyright information

© Springer Science+Business Media New York 1997

Authors and Affiliations

  • W. N. Venables
    • 1
  • B. D. Ripley
    • 2
  1. 1.Department of StatisticsUniversity of AdelaideAdelaideAustralia
  2. 2.University of OxfordOxfordEngland

Personalised recommendations