Advertisement

The S Language: Syntax and Semantics

Chapter
  • 621 Downloads
Part of the Statistics and Computing book series (SCO)

Abstract

This chapter provides a reprise of the material introduced in Chapters 2 and 3 of MASS. Chapter 3 introduces more advanced language concepts that are important for programming: there are also class-oriented features which we discuss in Chapters 4 and 5.

Keywords

Dimension Vector Data Frame Partial Match Character String Index Vector 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    These prompts can be altered. See help (opt ions).Google Scholar
  2. 2.
    If the expression consists of a simple name such as x, only, the. Last. value object is not changed.Google Scholar
  3. 3.
    one exception is formal argument names in R and in the old S engine. 4see page 154 for one example.Google Scholar
  4. 5.
    For a full list in S-PLUS see ?mode on your system.Google Scholar
  5. 6.
    R does not use single-precision variables internally, but setting the storage.mode to “single” sets an attribute which ensures that suitable copies are made when calling compiled code.Google Scholar
  6. 8.
    and in the new S engine this removes the names.Google Scholar
  7. 9.
    Note that the names are singular: it is all too easy to write nrows !Google Scholar
  8. An extra argument may be included when subsetting factors, as in f [i, drop=T], to include only those levels that occur in the subset. Under the default, drop=F, the levels are not changed.Google Scholar
  9. 11.
    logical columns are not converted in the new S engine, nor in R.Google Scholar
  10. 12.
    matrices of class model. matrix are an exception: they are included as a single object.Google Scholar
  11. 14.
    not in S-PLUS 3.x.Google Scholar
  12. 15.
    In the new S engine it must also reside in the local database.Google Scholar
  13. 16.
    in principle. In the new S engine it may create references to parts of the original object. 17in the S engines; it gives an error in R.Google Scholar
  14. 18.
    in package mva in R. Google Scholar
  15. 19.
    an anonymous function is a argument list and body used inline, without being given a name. 20This is one of the few places where the recycling rule is disabled: the replacement must be scalar or a vector of the correct length.Google Scholar
  16. 21.
    in S-PLUS versions prior to 6.x ` * ’ is a wildcard character matching zero or more characters and ? ’ matches precisely one character.Google Scholar
  17. 23.
    and primitive functions in R.Google Scholar

Copyright information

© Springer Science+Business Media New York 2000

Authors and Affiliations

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

Personalised recommendations