ligges@statistik.uni-dortmund.de
2004-Oct-07 19:33 UTC
[Rd] two help problems in R-2.0.0 for Windows (PR#7269)
R-2.0.0, WinNT / WinXP: options(chmhelp=TRUE) ?dnorm # does not work! ?Normal # works! Looks like calling compiled html help does not work for aliases, but only for the title of help pages... And a quick fix without changing the design is to change lines 136-137 in .../src/library/utils/R/help.R as follows: - err <- .C("Rchtml", hlpfile, topic, - err = integer(1), PACKAGE = "")$err + err <- .C("Rchtml", hlpfile, rev(strsplit(file, "/")[[1]])[1], + err = integer(1), PACKAGE = "")$err but I think it is a problem by design and the name of the help pages should be returned by help() as well (not only implicitly). Well, for htmlhelp, there is another error. The browser (e.g. Mozilla 1.7.3) tries to open "T:\R\library\stats\html/Normal.html" and has problems with different kinds of slashes (/ vs. \). options(chmhelp=FALSE, htmlhelp=TRUE) ?dnorm # does not work! This can be fixed by changing line 4 in .../src/library/utils/R/windows/help.R as follows: - browseURL(file) + browseURL(chartr("/", "\\", file)) AArrrrrgh, I've never used non-text help pages in the developer releases ... and obviously nobody else ... Uwe Ligges
Prof Brian Ripley
2004-Oct-07 20:24 UTC
[Rd] two help problems in R-2.0.0 for Windows (PR#7269)
On Thu, 7 Oct 2004 ligges@statistik.uni-dortmund.de wrote:> Well, for htmlhelp, there is another error. The browser (e.g. Mozilla > 1.7.3) tries to open "T:\R\library\stats\html/Normal.html" and has > problems with different kinds of slashes (/ vs. \).I can't reproduce that. I get forward slashes only. Can you track down where the \ are coming from?> options(chmhelp=FALSE, htmlhelp=TRUE) > ?dnorm # does not work! > > > This can be fixed by changing line 4 in > .../src/library/utils/R/windows/help.R > as follows: > > - browseURL(file) > + browseURL(chartr("/", "\\", file)) > > > > > AArrrrrgh, I've never used non-text help pages in the developer releases > ... and obviously nobody else ...Well, I have and Firefox works properly, for example. I've not used Mozilla recently as Firefox seems rather better. I also checked, and IE6 works too. Do you have a browser set (options(browser=)), or are you relying on file associations? Since this is to be a file:// URL, I believe forward slashes are correct, but we are at the mercy of Windows browser providers. Brian -- 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
ligges@statistik.uni-dortmund.de
2004-Oct-08 19:50 UTC
[Rd] two help problems in R-2.0.0 for Windows (PR#7269)
Prof Brian Ripley wrote:> On Thu, 7 Oct 2004 ligges@statistik.uni-dortmund.de wrote: > > >>Well, for htmlhelp, there is another error. The browser (e.g. Mozilla >>1.7.3) tries to open "T:\R\library\stats\html/Normal.html" and has >>problems with different kinds of slashes (/ vs. \). > > > I can't reproduce that. I get forward slashes only. Can you track down > where the \ are coming from?Brian, you are right, in the object "file", there are only forward slashes. Looks like Mozilla (1.7.3) cannot interpret "T:/R/library/stats/html/Normal.html" and it changes the string in its navigation bar to: "T:\R\library\stats\html/Normal.html" Specifying "file:///T:/R/library/stats/html/Normal.html" works, but the "file:///" part seems to be required if using forward slashes. Note that the fix to use chartr("/", "\\", file) is also used in help.start(). I guess there was a reason to include it.>> options(chmhelp=FALSE, htmlhelp=TRUE) >> ?dnorm # does not work! >> >> >>This can be fixed by changing line 4 in >>.../src/library/utils/R/windows/help.R >>as follows: >> >>- browseURL(file) >>+ browseURL(chartr("/", "\\", file)) >> >> >> >> >>AArrrrrgh, I've never used non-text help pages in the developer releases >>... and obviously nobody else ... > > > Well, I have and Firefox works properly, for example. I've not used > Mozilla recently as Firefox seems rather better. I also checked, and IE6 > works too. Do you have a browser set (options(browser=)), or are you > relying on file associations?The latter.> Since this is to be a file:// URL, I believe forward slashes are correct, > but we are at the mercy of Windows browser providers.See above. The line browseURL(paste("file://", file, sep="/")) works for me. Uwe> Brian >