[Rd] Can't find linked HTML helpfile unless package is specified (PR#819)

Peter Kleiweg kleiweg@let.rug.nl
Sat, 20 Jan 2001 02:31:36 +0100 (CET)


kleiweg@let.rug.nl skriver...

> This patch seems to solve the problem:
> 
> 
> --- base	Mon Jan 15 18:01:16 2001
> +++ base.new	Sat Jan 20 00:43:48 2001
> @@ -10161,11 +10161,12 @@
>                          ## we need to use the version in ~/.R if we can.
>                              lnkfile <-
>                                  file.path(Sys.getenv("HOME"), ".R",
>                                            "library", package, "html",
>                                            paste(topic, "html", sep="."))
> -                            if (file.exists(lnkfile)) file <- lnkfile
> +                            lnkfile <- lnkfile[file.exists(lnkfile)]
> +                            if (is.character(lnkfile)) if (length(lnkfile) == 1) file <- lnkfile
>                          }
>                          if (file == ofile) {
>                              warning("Using non-linked HTML file: style sheet and hyperlinks may be incorrect")
>                          }
>                          file <- paste("file:", file, sep="")

It doesn't always. For example, doing ?sin I get the non-linked 
files again.

First:
     file <- index.search(topic, INDICES, "AnIndex", type)
sets variable file to "/usr/local/R/lib/R/library/base/html/Trig.html"

Then, variable lnkfile is first set to:
[1] "/home/peter/.R/library/ctest/html/sin.html"
[2] "/home/peter/.R/library/base/html/sin.html"
Neither of these files exist, so in the second step, lnkfile
becomes empty.

-- 
Wekte priegel

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