Skip to main content

Part of the book series: Statistics and Computing ((SCO))

  • 656 Accesses

Abstract

S is a language for the manipulation of objects. It aims to be both an interactive language (like, for example, a Unix shell language) as well as a complete programming language with some convenient object-oriented features. In this chapter we shall be concerned with the interactive language, and hence certain language constructs used mainly in programming will be postponed to Chapter 4.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 74.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. When S writes objects onto an external file in assignment form (using dump) the left-hand side of each top level assignment is always placed in quotes, whether the name is standard or not.

    Google Scholar 

  2. These prompts can be altered: see Section 2.11.

    Google Scholar 

  3. If the expression consists of a simple name such as x , only, the . Last . value object is not changed.

    Google Scholar 

  4. In S-PLUS 3.4 and later an extra argument may be included when subsetting factors, as in f [i , drop=T] , to ensure that the levels are pruned to include only those which occur in the subset. Under the default, drop=F , the levels are not changed.

    Google Scholar 

  5. The result of e1 %/% e2 is floor(e1/e2) if e2!=0 and 0 if e2= 0. The result of e1 %% e2 is e1-floor (e1/e2) *e2 if e2 ! =0 and e1 otherwise (see Knuth, 1968, §1.2.4). Thus %/% and %% always satisfy e1==(e1%/%e2)*e2+e1%%e2.

    Google Scholar 

  6. If the argument to var is an n × p matrix the value is a p × p sample covariance matrix obtained by regarding the rows as sample vectors.

    Google Scholar 

  7. paste is discussed on page 42.

    Google Scholar 

  8. For precise details see page 153. 9 These object files should normally not be manipulated except through S-PLUS, although it is sometimes convenient to transfer them directly to another compatible computer.

    Google Scholar 

  9. There are further types of possible database which we have never had occasion to use.

    Google Scholar 

  10. Note that the object name as the argument to get must be given in quotes.

    Google Scholar 

  11. This example is artificial as there is a function diag that can be used for both purposes.

    Google Scholar 

  12. Note that the names are singular: it is all too easy to write nrows !

    Google Scholar 

  13. The use of “list” is unfortunate here since it has nothing to do with S list objects.

    Google Scholar 

  14. This is one of the few places where the recycling rule is disabled: the replacement must be a scalar or of the correct length.

    Google Scholar 

  15. if else is discussed on page 114.

    Google Scholar 

  16. The concept of class is discussed in Section 4.4 but the details are not required to understand the present section.

    Google Scholar 

  17. There is a bug in both 3.3 and 3.4 which prevents matrix indices being used on an assignment.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer Science+Business Media New York

About this chapter

Cite this chapter

Venables, W.N., Ripley, B.D. (1997). The S Language. In: Modern Applied Statistics with S-PLUS. Statistics and Computing. Springer, New York, NY. https://doi.org/10.1007/978-1-4757-2719-7_2

Download citation

  • DOI: https://doi.org/10.1007/978-1-4757-2719-7_2

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4757-2721-0

  • Online ISBN: 978-1-4757-2719-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics