[Rd] Bug in help(). (PR#10859)

ripley at stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Feb 28 14:35:20 CET 2008


On Wed, 27 Feb 2008, r.turner at auckland.ac.nz wrote:

>
> There appears to be a bug in help() when there are multiple packages
> attached
> containing functions with the same name, and offline=TRUE.

It's in utils:::print.help_files_with_topic, now fixed in R-devel.

The simple workaround is to supply the package name in the help call.

>
> Example:
>
> 	library(mgcv)
> 	library(gam)
>
> If one simply does:
>
> 	help(gam) # No ``offline=TRUE''
>
> then the following message appears:
>
> Help on topic 'gam' was found in the following packages:
>
>   Package               Library
>   mgcv                  /Library/Frameworks/R.framework/Resources/
> library
>   gam                   /Users/rturner/Rlib
>
> and a small chooser-menu window pops up to permit one to select the
> package to be referred to.
>
> However if one does
>
> 	help(gam,offline=TRUE)
>
> then the message about multiple packages appears, immediately
> followed by
>
> Error in titles[i] <- if (inherits(tmp, "try-error")) "unknown title"
> else tmp[tools::file_path_sans_ext(tmp$File) ==  :
>   nothing to replace with
>
> (and no chooser-menu window pops up).
>
> Session info:
>
> R version 2.6.2 (2008-02-08)
> i386-apple-darwin8.10.1
>
> locale:
> C
>
> attached base packages:
> [1] splines   stats     graphics  grDevices utils     datasets  methods
> [8] base
>
> other attached packages:
> [1] mgcv_1.3-29 gam_0.98    misc_0.0-2
>
> loaded via a namespace (and not attached):
> [1] rcompgen_0.1-17 tcltk_2.6.2     tools_2.6.2
>
>
> 		cheers,
>
> 			Rolf Turner
>
>
>
> ######################################################################
> Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

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



More information about the R-devel mailing list