[R] Assigning functions in Rprofile

Robert King robert.king at newcastle.edu.au
Wed Apr 21 08:21:17 CEST 2004

I use the ugly hack shown below as my .Rprofile (mainly because I couldn't
find any other way to spawn a new mozilla window on starting R or calling
help.start(), but then send all the help html documents to that new

With a recent change from a cvs checkout to the released 1.9.0 I find that
the new hs() appears if there is nothing of that name in .RData, but if
there is the old hs() there, it just stays.

What is the cause of this?


I'm using a debian i386 system.

hs <- function(){
if (nchar(system("echo $DISPLAY",intern=T))==0) # no X
        ret <- "no X"}
else    {system("mozilla") # we have X - I'm starting this to get a new
        # window for the R session, without starting a new window every
        ret <- "X"}

Robert King, Statistics, School of Mathematical & Physical Sciences,
University of Newcastle, Australia
Room V133  ph +61 2 4921 5548
Robert.King at newcastle.edu.au   http://maths.newcastle.edu.au/~rking/

He defended the cause of the poor and needy, and so all went well. Is that
not what it means to know me?" declares the LORD.
        -- Jeremiah 22:16

More information about the R-help mailing list