ghelp: Widget to interface with help pages

Description Usage Arguments Details See Also Examples

View source: R/ghelp.R

Description

A widget to interface with the help pages and that widget placed in a browser. The widget is a notebook capable of showing several pages at once.

Usage

1
2
ghelp(topic = NULL, package = NULL, container = NULL, ..., toolkit = guiToolkit())
ghelpbrowser(title = "Help browser", maxTerms=100, width=1000, height=600, ..., toolkit = guiToolkit()) 

Arguments

topic

Help topic

package

Which package to look for topic in

container

Optional container to attach widget to

title

Title of help browser

maxTerms

Maximum number of search responses

width

Width of browser window in pixels

height

Height of browser window in pixels

...

Passed to add method of container

toolkit

Which GUI toolkit to use

Details

The ghelp widget is a notebook to hold help pages. One can add pages with add. The help page is specified with a character vector or list. The first component is the topic, the second and optional package designation. The svalue method returns a list with topic and package. The dispose method will remove the current page. For toolkits that support them, closebuttons appear on the etabs

The ghelpbrowser constructor produces a stand alone GUI for browsing help pages. Unlike other gWidgets constructors, this has no container argument.

See Also

The helpr package provides a much better interface to R's help pages.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
  w <- gwindow("Help browser", visible=FALSE)
  g <- ggroup(horizontal=FALSE, container=w)
  g1 <- ggroup(container=g)
  addSpring(g1)
  glabel("Help on:", container=g1)
  e <- gedit("", container=g1)
  helpWidget <- ghelp(container = g, expand=TRUE)
  addHandlerChanged(e, handler=function(h,...) {
     add(helpWidget, svalue(h$obj))
  })
  visible(w) <- TRUE
  ## add others
  add(helpWidget,"base:::mean")
  add(helpWidget, list(topic="mean", package="base"))
  add(helpWidget, "boxplot")


## End(Not run)

gWidgets documentation built on May 2, 2019, 6:22 p.m.