Bug 17250 - ?pkg::fn() throws an error
Summary: ?pkg::fn() throws an error
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R-devel (trunk)
Hardware: All All
: P5 trivial
Assignee: R-core
Depends on:
Reported: 2017-03-30 12:26 UTC by Richard Cotton
Modified: 2017-04-18 16:56 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Richard Cotton 2017-03-30 12:26:52 UTC
These three commands for opening a help page all work:


This throws an unhelpful error:


Error in get0(name, envir = where, mode = "function", inherits = FALSE) : 
  invalid first argument
In addition: Warning message:
In if (!nzchar(name)) stop(gettextf("expected a non-empty character string for argument name"),  :
  the condition has length > 1 and only the first element will be used

For consistency, it would be useful if calling ?pkg::fn() opened the help page for pkg::fn.  This is especially important since some IDEs default to automatically appending parentheses when you tab-complete the function name.
Comment 1 Duncan Murdoch 2017-03-30 14:29:02 UTC
I agree it should work.  It will need mods to utils:::`?` and utils:::.helpForCall.  I'm not going to have time to do this before 3.4.0, but if you want to work out a patch, someone else might put it in before code freeze.  If not, I'll try to do so in R-patched sometime after the release.
Comment 2 Duncan Murdoch 2017-04-18 16:55:55 UTC
Fixed in R-devel (will commit soon after a bit more testing).  After the 3.4.0 release, I'll port to R-patched, so it should make 3.4.1.