[R] help() and lib.loc (was Re: question about sgeostat)
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Tue May 30 12:25:25 CEST 2000
On Tue, 30 May 2000, Albrecht Gebhardt wrote:
> > help(tri.mesh)
> Error in help(tri.mesh) : No documentation for `tri.mesh'
> > help(tri.mesh, package="tripack", lib.loc="~/R-Lib-x86/")
> Error in help(tri.mesh, package = "tripack", lib.loc = "~/R-Lib-x86/") :
> No documentation for `tri.mesh'
> > help(tri.mesh, package="tripack", lib.loc="/home/users/agebhard/R-Lib-x86/")
> ... works
>
> So it seems the lib.loc path contents in library() and help() gets parsed
> differently:
>
> library() knows about the expansion of "~" to the $HOME variable (because
> library(tripack,lib.loc="~/R-Lib-x86/") works) but help() does not.
Yes. As "~" is a csh construct, and not in general a valid part of a path,
it is just chance that it works for library. index.search(), the
tool used by help, does not know about "~". sys.source() as used
by library () does.
I'll see if I can add "~" to the knowledge of index.search.
Generally, though, don't assume that packages know about csh's shortcuts.
--
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list