[R] functions different in R and S

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Tue Feb 18 21:48:02 CET 2003

new() *is* in R, in package methods. Which is where you would expect, as 
it creates a new instance of a formal class.  It is not in many other
implementations of S, however.

Most of the time in S, ! means `not', the same as in R, and system() 
exists in S (but not in all version of S-PLUS).

There is a partial list in the R FAQ, but I suspect no one knows all the
differences, and those who know most have probably forgotten a few. You
also have to be very careful what you mean by `S': very few of us have
seen vanilla S, and S-PLUS 6.x is not S, nor is S-PLUS 3.4, nor is S-PLUS
2000 ... and the differences between them are about as large as between
their medoid and R.

There are major differences not in the functions, e.g. scoping rules, 
interpretation of formulae: see the R FAQ.

On Tue, 18 Feb 2003, Huiqin Yang wrote:

>   We have encountered the problem of functions that appear different in
> R and S.  For example, ! in S becomes system() in R.  We also have
> found that new() in S does not exist in R, unless it has a different
> name.  I wonder whether there is any resource that can point to useful substitutes for S functions that are not recognized by R.  At the same time whether there is a list
> of functions, which appear in both R and S but which don't do exactly the same thing.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list