R-alpha: system() ok -- is.R() function

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Fri, 17 Oct 1997 17:34:23 +0200


>>>>> "Paul" == Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:

    Paul> It seems I just need intern=T. I'll just put this in my small
    Paul> list of S and R differences:

    >> mode(system("date \'+%Y %m %d %H %M %S\'", intern=T))
    Paul> [1] "character"
    >>

Paul, remember that in S-plus,  system(.) does not exist at all.
When you use  system(.) in S-plus,
you use your own version
which I remember you posted as part of your
	``S--R compatibility package''
on R-help or R-devel a while ago.

So I think you should redefine your  system(..) function in S-plus.

BTW: I have been using your  S--R compatibility package for quite a while
     now, and I can assure you that you can shorten it quite a bit, once
     0.60 (this is ``sixty'', not ``six o'') will be out.

Note that I mainly use the `is.R(.)' function
originated by you, but the follow version is ``better'' because it

###--  works in  all versions of
###-- S  (including "S version 4", (beta))
###-- R
###-- S-plus

is.R <- function() { ## returns  'TRUE'  iff we are using 'R'
  exists("version") && !is.null(vl <- version$language) && vl == "R"
}

-- Martin
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-