Learn R Programming

svMisc (version 1.2.3)

is_help: Check for the existence of an help file, or some context

Description

For is_help(), determine if 'topic' has a help file and example to run. For is_win() and is_mac(), determine if the platform is Windows or MacOS. For is_aqua(), is the R UI is AQUA, the standard R GUI under Macintosh? For is_rgui(), determine if the default Rgui under Windows is in use, and with is_sdi() in this case, you can check if it is in SDI (single-document interface) versus MDI (multi-document interface, by default). is_rstudio() and is_rstudio_server() check if R is run under RStudio (server), and is_jgr() indicate if the R GUI is JGR.

Usage

is_help(topic, package = NULL, lib.loc = NULL)

is_win()

is_rgui()

is_sdi()

is_mac()

is_aqua()

is_rstudio()

is_rstudio_desktop()

is_rstudio_server()

is_jgr()

isHelp(topic, package = NULL, lib.loc = NULL)

isWin()

isRgui()

isSDI()

isMac()

isAqua()

isJGR()

Arguments

topic

Name or literal character string: the online help topic to look for.

package

A character vector giving the package names to look into for help or example code, or NULL. By default, all packages in the search path are used.

lib.loc

A character vector of directory names of R libraries, or NULL. The default value of NULL corresponds to all libraries currently known. If the default is used, the loaded packages are searched before the libraries.

Value

All these functions return either TRUE or FALSE depending on the tested item, except for is_help(), which returns a logical vector with two elements. The first one indicating if there is a help file, and the second one indicating if there are examples associated with this help file.

See Also

example(), help(), capabilities()

Examples

Run this code
# NOT RUN {
is_help("help")		# Help and example
is_help("Rtangle")	# Help but no example
is_help("notopic")	# No help or example

is_win()
is_mac()

is_aqua()
is_rgui()
is_sdi()
is_rstudio()
is_rstudio_desktop()
is_rstudio_server()
is_jgr()
# }

Run the code above in your browser using DataLab