[Rd] Re: [R] Several R vs S-Plus issues

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Thu, 4 Oct 2001 10:13:54 +0200


>>>>> David Brahm writes:

> ...

> OK, so here's what I think I've learned.  Feedback please if I've
> still got it wrong.

> 1) Do not Cc: to r-bugs!!!

> 2) Bugs go individually to r-bugs.  Here is the only one I think qualifies:
>    - myfun <- function(x, ...) {x[...] <- 0;  x}  fails if no ... given

> 3) Feature and compatibility requests go to r-devel, to which I am just now
>    subscribed.  Separate messages, I suppose.  These would be:
>    - LETTERS[c(NA,2)] in S is c("","B"), but in R is c("NA","B")

I think we do not want to change this.

Splus has

> (1:2)[c(NA,2)]
[1] NA  2
> is.na((1:2)[c(NA,2)])
[1] T F
> is.na(c(TRUE, FALSE)[c(NA,2)])
[1] T F

etc, so I think the logic would be that we get NA whenever we subscript
by NA.  The current Splus behavior for character vectors is different,
and I do not see why it should.  Note that in R,

R> is.na(LETTERS[c(NA,2)])
[1]  TRUE FALSE

so we really have NA but it is printed as "NA" (and this might be
another case where <NA> would be better).

>    - system() has no "input" argument in R
>    - No slice.index()
>    - No rowSums(), colSums(), colVars(), etc.

Doug Bates had raised this issue some time ago.  In the interest of
keeping the S language core as small as possible, I'd rather recommend
against adding these.  We can basically do that same using apply(), and
if the point is to have fast C code I think we should rather
special-case apply accordingly.

>    - No unpaste()

This is a function from the chron package, and it is also available in
the R version of chron.  Again, I am not sure whether this should be in
the S language core: we have strsplit.

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._