is_help {svMisc} | R Documentation |
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 |
lib.loc |
A character vector of directory names of R libraries, or
|
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.
Note
The code of is_help()
is largely inspired from the first part of
example()
.
Under Rgui, to switch fro MDI to SDI more, go to the menu entry
'Edit' -> 'GUI preferences' to change the Rgui mode, or start Rgui with the
'–SDI' argument line parameter. Under another platform than Windows or if it
is not Rgui, then is_sdi()
always returns FALSE
.'
See Also
example()
, help()
, capabilities()
Examples
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()