I'm experiencing a new and annoying phenomenon which seems to consist of an unfortunate interaction between R-1.7.0 and netscape version 7. When I invoke help.start(), a netscape window duly appears with the browser pointed at the file .../R/doc/html/index.html as one would hope and expect. However if I then ask for help on a function, e.g. > help(glm) the help does NOT get displayed in the existing netscape window. Instead, up pops a small window asking me to ``Select User Profile''. If I click on ``Start Netscape 7.0'' in this small window, I get a message saying ``Netscape 7.0 cannot use the profile ``rolf'' because it is in use. Please choose another profile or create a new one.'' If I do create a new one, and then ask for help on another function, the same thing happens unless I explicitly close the window in which the help on glm() is displayed. OK, I can do that, and keep a ``profile'' around for displaying R help, but it's an irritation and a slow-down. Is there a way to tell R or netscape --- I'm not sure which one I should be talking to --- to display the help in the existing netscape window, and not keep trying to open new ones under new ``profiles''? cheers, Rolf Turner rolf at math.unb.ca
Forgot to mention: > version _ platform sparc-sun-solaris2.9 arch sparc os solaris2.9 system sparc, solaris2.9 status major 1 minor 7.0 year 2003 month 04 day 16 language R cheers, Rolf Turner rolf at math.unb.ca
No avuncular advice has been forthcoming from the list about my problem with getting html-help, but I've been fiddling around with it myself and have had a certain amount of insight. (???) The source of the problem seems to be the way that the variable isLocal is defined in browseURL(): isLocal <- length(grep("^(localhost|):", Sys.getenv("DISPLAY"))) > 0 This seems to make isLocal FALSE in any context in which I work. For instance, I am currently sitting at an NCD Xwindows terminal, logged into host ``erdos''. If I execute > Sys.getenv("DISPLAY") I get DISPLAY "131.202.169.153:0.0" the string of digits being the IP address of the terminal. Not a "^(localhost|):" in sight. I thought to rectify this --- in a kludgy and perhaps dangerous way --- by creating for myself a local version of browseURL() in which isLocal is always TRUE. But a funny thing happened: I ***still*** got the annoying phenomenon of Netscape's trying to open a new browser window (and wanting a new ``profile'') every time I asked for help on another function. To investigate a bit, I created a local version of help() in which I could stick some browser() calls to find out the values of certain variables. Blow me down, but didn't things now work just fine! Took out the browser() calls; things still worked. Removed the local help() --- back to not working. Even more mysterious to me is the fact that if I just put in a local help(), by doing > help <- help then things don't work. But (ah-ha!) the way I created my local copy of help() was to make a local ascii file of the code of help() (with a ``help <- '' added at the beginning) and then source this file. When this procedure is followed, things ***do*** work! This applies even though > all.equal(help,get("help",pos=grep("base",search())) yields TRUE, so that nothing has actually changed in my local copy. So help() doesn't find the local copy of browseURL() unless there is also a local copy of help() --- and that local copy needs to have been created by sourcing a text file!!! This doesn't make any sense to me. It verges on the mystical. What on earth is going on? More to the point is there any way that I can persuade help() that ``isLocal'' should be taken to be TRUE? I don't follow the rationale of ``isLocal'' anyhow. If I'm sitting at machine melvin, but am typing away into a window that is connected to host clyde, and I start R in that window, then help.start() will invoke the Netscape that lives on clyde. (Steps must of course have been taken to permit clyde to open a Netscape window on melvin's display, but that's all done in the normal course of events.) Hence the Netscape that gets fired up will look for the *.html help files on clyde and everything will work just as if I were sitting at clyde's console. So why would ``isLocal'' ***ever*** need to be FALSE? cheers, Rolf Turner
On Mon, 21 Apr 2003, Rolf Turner wrote:> > I'm experiencing a new and annoying phenomenon which seems to consist > of an unfortunate interaction between R-1.7.0 and netscape version 7. > > When I invoke help.start(), a netscape window duly appears > with the browser pointed at the file .../R/doc/html/index.html > as one would hope and expect. > > However if I then ask for help on a function, e.g. > > > help(glm) > > the help does NOT get displayed in the existing netscape window. > Instead, up pops a small window asking me to ``Select User > Profile''. If I click on ``Start Netscape 7.0'' in this small > window, I get a message saying ``Netscape 7.0 cannot use the profile > ``rolf'' because it is in use. Please choose another profile or > create a new one.'' >I think this is a thoughtful new feature of Netscape---I have encountered this sort of catch 22 from Netscape on a linux box when I have not been interacting with R at all. I simply wanted to use Netscape but it said dscott was in use and I had to create a new user profile. Subsequently I have to choose from dscott or the new profile I was forced to create. Possibly if you do create a new profile, you might be able to use rolf on your use of Netscape for help in R David Scott _________________________________________________________________ David Scott Department of Statistics, Tamaki Campus The University of Auckland, PB 92019 Auckland NEW ZEALAND Phone: +64 9 373 7599 ext 86830 Fax: +64 9 373 7000 Email: d.scott at auckland.ac.nz Graduate Officer, Department of Statistics Webmaster, New Zealand Statistical Association: http://www.stat.auckland.ac.nz/nzsa/
The recent discussion on lexical scoping has enlightened me as regards the phenomenon that I found so puzzling yesterday:> So help() doesn't find the local copy of browseURL() unless there is > also a local copy of help() --- and that local copy needs to have > been created by sourcing a text file!!! This doesn't make any sense > to me. It verges on the mystical. What on earth is going on?Thomas Lumley's succinct explanation> ... the lookup depends on where a function was defined, not where > it was called from.made the light click on. No mystical behaviour at all. The silence as regards the substance of my question has been deafening, however. ***HOW*** do I get help()/browseURL() to acquire a sensible idea of ``isLocal'' so that Netscape does not keep demanding new windows and new ``profiles''? Does this behaviour not amount to a bug in help()/browseURL()? cheers, Rolf Turner rolf at math.unb.ca