Skip to content

Front ends handling help.search() results?

6 messages · Thomas Friedrichsmeier, Henrik Bengtsson, Duncan Murdoch

#
Which front ends process the help.search() results to produce nice 
clickable lists, instead of the simple text display that's the default?  
I know the R.app gui on  Mac OS does; are there others?

I'm asking because one of the decisions made when R Core met in Vienna 
was to allow vignettes to be returned as results of help.search().  All 
of those front ends will need to be able to handle this.

Duncan Murdoch
#
On Friday 29 July 2011, Duncan Murdoch wrote:
RKWard does, too. (More precisely: It has a UI for searching help files, which 
relies on help.search()).
Will this affect the structure of the hsearch class?

Currently, our implementation for showing an item from the result list is to 
simply call help(help_type="html"), appropriately. What are the implications 
of vignettes for the behavior of help(), if any (with or without specification 
of help_type)?

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20110730/86f739f3/attachment.bin>
#
On 11-07-30 4:40 AM, Thomas Friedrichsmeier wrote:
Yes, there will be additional components added to it.  You can mostly 
ignore them, but not completely:

I will add an additional column named "Type" to the "matches" component 
of the help.search() results.  It will contain "help" for results that 
are man pages, "vignette" for results that are vignettes, and "demo" for 
results that are demos.  The quick fix is to just ignore any results 
other than "help" results; then you'll get the same display as before.

I will also add components to the result corresponding to arguments 
passed to help.search:  "agrep", "ignore.case", "package", "lib.loc",
and "types".  (The last of these is a character vector saying which 
types of documentation were requested, i.e. some combination of "help", 
"vignette", "demo".)  These can be ignored, or used to regenerate the 
same results as the original.  (The dynamic help system regenerates 
results for display.)

I have not committed this code yet, because the new types of entries 
could mess up existing front ends and I wanted to give people some 
warning.  I expect I'll commit (to R-devel only) within a day or two.

Duncan Murdoch
#
On Saturday 30 July 2011, Duncan Murdoch wrote:
Many thanks for the warning! I have added (untested) support for the new 
result types in RKWard.

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20110731/d6884de3/attachment.bin>
#
The R.rsp package has a proof of concept page:

1. library("R.rsp")
2. browseRsp(path="/R/help/")
3. At the bottom, there is a "help.search" form.  Type in search term,
e.g. "svd".

This is all web browser based, so it should be able to handle compiled
vignettes (as long as there are valid paths/URL paths).

/Henrik

On Fri, Jul 29, 2011 at 11:11 AM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
#
On 11-07-31 12:32 PM, Henrik Bengtsson wrote:
help.search() won't give the paths.  You can get those from the 
vignette() function, or by reading the <pkg>/Meta/vignette.rds database.

There will be code in R-devel to do this that you could copy, once I 
commit (maybe tonight).

Duncan Murdoch