Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.GSO.4.05.10006211904440.20797-100000@auk.stats>
Date: 2000-06-21T18:06:50Z
From: Brian Ripley
Subject: OS calls
In-Reply-To: <3950F05D.A40D22FD@bank-banque-canada.ca>

On Wed, 21 Jun 2000, Paul Gilbert wrote:

> Brian
> 
> >> local.host.netname <- function() {system.call("uname -n")}
> >> whoami <- function(){system.call("whoami")} # return user id (for mail)
> 
> >Those are not even meaningful on vanilla (non-networked) Windows systems. I
> >am not really sure why one would want them in general R code.
> 
> I thought whoami was meanful on Windows NT even without a network, but in any

NT, yes, Win 9x, no, and Win 9x is > 90% of the market.

> case it is true that I want it for a network environment. You could put in
> somewhat meaningful defaults like "localhost" and "root", but I think most
> people are on a network these days.

I doubt it. DUN does not count as a network for these purposes, and indeed
the local and network IDs can be different even on NT (and frequently are).

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._