Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pExplorer

A widget to explore R packages


Description

This widget allows users to explore R packages in the R library and try the example code.

Usage

pExplorer(pkgName = "", pkgPath = "", exclude = getExclude(), getFocus =
TRUE)
getPkgContents(pkgName, exclude = getExclude())
getFileContents(path, fileName)
getExclude()
getRPkgs(pkgPath)
hasDesc(pkgPath)
procRda(fileName)
procHelp(fileName)
procPDF(fileName)
procHTML(fileName)

Arguments

pkgPath

pkgPath a character string for the path where R packages are loacted

path

path a character string for the path of a given file

pkgName

pkgName a character string for the name (including path) of an R package to be explored

fileName

fileName a character string for the name (including path) of a file of interest

exclude

exclude a vector of character strings containing the directory or file names that will not be available for explorering. Package names have to have a system file separator appanded to the end (e. g. "/" under Unix)

getFocus

getFocus a boolean indicating whether a widget should grab the focus

Details

With or without a package name, the widget will have all the installed R package names in a dropdown list for user to select. As the default, the first element from list.files will be selected and the contents displayed if no package name is given.

getPkgContents gets the contents of a given R package and getFileContents gets the contents of a givan file.

getRPkgs, hasDesc, procRda, procHelp, procPDF, and procHTML are functions called by pExplorer to process different file or directory types.

Value

The widget returns invisiable()

Author(s)

Jianhua Zhang

References

Documentation on R packages

See Also

Examples

require("tkWidgets") || stop("tkWidgets not available")
    getPkgContents(.libPaths(), "tkWidgets")
    getFileContents(file.path(path.package("tkWidgets"), "help"),
        list.files(file.path(path.package("tkWidgets"), "help"))[1])
    if(interactive()){
        pExplorer()
    }

tkWidgets

R based tk widgets

v1.68.0
Artistic-2.0
Authors
J. Zhang <jzhang@jimmy.harvard.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.