Andrew Ward
2005-Jan-07 02:37 UTC
[R] Windows package development: bad html links to functions in non-standard packages
I am using R 2.0.1 Patched on Windows 2000. I have created a binary package for Windows that builds, checks, installs and works without errors. In some of my .Rd files, I have links to functions in the standard packages supplied with R as well as links to others in add-on packages that I have installed. For instance, one .Rd file has the following snippet: \seealso{ \code{\link[lattice]{xyplot}}, \code{\link[MASS]{rlm}}, \code{\link[RODBC]{odbcConnect}}} I have installed RODBC in a separate library, pointed to by R_LIBS. The HTML links to xyplot and rlm work fine, but those to packages not in the standard library can't be found (such as to odbcConnect above). The link points to a non-existent file in the main library (file:///c:/r/library/RODBC/html/odbcConnect.html) rather than to the existing file in R_LIBS (z:/r/library/RODBC/html/odbcConnect.html). I would be very grateful if someone could point out what I have carelessly overlooked in endeavouring to link to HTML files in both the main and in non-standard packages libraries. Thank you very much for your advice. Regards, Andrew C. Ward, Senior Analyst (Quantitative), Tel: +61 7 3864 0439 Queensland Studies Authority, Fax: +61 7 3229 3318 295 Ann Street, Brisbane Qld 4000, Australia ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This email (including any attached files) is for the intended recipient(s) only. If you received this email by mistake, please, as a courtesy, tell the sender, then delete this email. The views and opinions are the originator's and do not necessarily reflect those of the Queensland Studies Authority. All reasonable precautions have been taken to ensure that this email contained no viruses at the time it was sent.
Prof Brian Ripley
2005-Jan-07 07:54 UTC
[R] Windows package development: bad html links to functions in non-standard packages
This is discussed in the documentation. E.g. rw-FAQ says 3.7 Hyperlinks in Compiled HTML sometimes do not work. ===================================================== They may well not work between packages installed in different libraries. This is solved under Unix using symbolic links which Windows does not implement. and the same is true (but less so) for HTML. And ?link.html.help says Cross-library links do not work on this platform. 'fixup.package.URLs' attempts to correct links in the named package to the 'doc' directory (usually to icons) and to the 'base', 'utils', 'graphics' and 'stats' packages, and then stamps a file 'fixedHTMLlinks' in the package directory. On Fri, 7 Jan 2005, Andrew Ward wrote:> I am using R 2.0.1 Patched on Windows 2000. > > I have created a binary package for Windows that builds, checks, > installs and works without errors. In some of my .Rd files, I > have links to functions in the standard packages supplied with R > as well as links to others in add-on packages that I have installed. > For instance, one .Rd file has the following snippet: > > \seealso{ \code{\link[lattice]{xyplot}}, > \code{\link[MASS]{rlm}}, > \code{\link[RODBC]{odbcConnect}}} > > I have installed RODBC in a separate library, pointed to by > R_LIBS. The HTML links to xyplot and rlm work fine, but those to > packages not in the standard library can't be found (such as to > odbcConnect above). The link points to a non-existent file in the > main library (file:///c:/r/library/RODBC/html/odbcConnect.html) > rather than to the existing file in R_LIBS > (z:/r/library/RODBC/html/odbcConnect.html).Actually not: it points to a relative link, something like ../../../RODBC/html/odbcConnect.html.> I would be very grateful if someone could point out what I have > carelessly overlooked in endeavouring to link to HTML files in both > the main and in non-standard packages libraries.Only the statement that it does not work. -- Brian D. Ripley, ripley at 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
Andrew Ward
2005-Jan-11 01:18 UTC
[R] Windows package development: bad html links to functions in non-standard packages
Thank you to Professor Ripley for clearing this up for me. Embarrassingly, I read this FAQ several times, completely missing the point each time. Regards, Andrew C. Ward, Senior Analyst (Quantitative), Tel: +61 7 3864 0439 Queensland Studies Authority, Fax: +61 7 3229 3318 295 Ann Street, Brisbane Qld 4000, Australia -----Original Message----- From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] Sent: Friday, 7 January 2005 5:54 PM To: Andrew Ward Cc: r-help at stat.math.ethz.ch Subject: Re: [R] Windows package development: bad html links to functions in non-standard packages This is discussed in the documentation. E.g. rw-FAQ says 3.7 Hyperlinks in Compiled HTML sometimes do not work. ===================================================== They may well not work between packages installed in different libraries. This is solved under Unix using symbolic links which Windows does not implement. and the same is true (but less so) for HTML. And ?link.html.help says Cross-library links do not work on this platform. 'fixup.package.URLs' attempts to correct links in the named package to the 'doc' directory (usually to icons) and to the 'base', 'utils', 'graphics' and 'stats' packages, and then stamps a file 'fixedHTMLlinks' in the package directory. On Fri, 7 Jan 2005, Andrew Ward wrote:> I am using R 2.0.1 Patched on Windows 2000. > > I have created a binary package for Windows that builds, checks, > installs and works without errors. In some of my .Rd files, I > have links to functions in the standard packages supplied with R > as well as links to others in add-on packages that I have installed. > For instance, one .Rd file has the following snippet: > > \seealso{ \code{\link[lattice]{xyplot}}, > \code{\link[MASS]{rlm}}, > \code{\link[RODBC]{odbcConnect}}} > > I have installed RODBC in a separate library, pointed to by > R_LIBS. The HTML links to xyplot and rlm work fine, but those to > packages not in the standard library can't be found (such as to > odbcConnect above). The link points to a non-existent file in the > main library (file:///c:/r/library/RODBC/html/odbcConnect.html) > rather than to the existing file in R_LIBS > (z:/r/library/RODBC/html/odbcConnect.html).Actually not: it points to a relative link, something like ../../../RODBC/html/odbcConnect.html.> I would be very grateful if someone could point out what I have > carelessly overlooked in endeavouring to link to HTML files in both > the main and in non-standard packages libraries.Only the statement that it does not work. -- Brian D. Ripley, ripley at 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This email (including any attached files) is for the intende...{{dropped}}