Learn R Programming

RcppOctave (version 0.18.1)

o_help: Accessing Octave Help and Documentation Pages

Description

o_help retrieves the Octave help page associated with a given symbol. By default the page is printed out, but may also be silently retrieved or formatted for direct inclusion in R documentation files (i.e. Rd files).

o_doc displays documentation for the function FUNCTION_NAME directly from an on-line version of the printed manual, using the GNU Info browser. Type `q` to quit the browser.

Usage

o_help(NAME, character.only = FALSE, show = interactive(),
  format = c("plain", "rd", "txt", "latex", "HTML"))

o_doc(FUNCTION_NAME)

Arguments

NAME
Octave symbol (e.g. command, function, operator) passed to Octave function help to retrieve the related documentation.
character.only
a logical indicating whether NAME can be assumed to be a character string (TRUE) or should be substituted with substitute before using them (default).
show
logical that specifies if the help page should be shown using the as R documentation file (default), e.g. using a pager, or only returned as a single string. Note that when show=TRUE, the string is still returned but invisibly.
format
a specification of the output format. If TRUE or 'rd', the result is Rd code that wraps the Octave documentation string and is suitable for inclusion into Rd files. If one of the strings 'txt', 'latex' or 'HTML
FUNCTION_NAME
the name of the function from which to show the documentation. See the relevant Octave Documentation section below.

Value

  • this function is usually called for its side effect of printing the help page on standard output (argument show=TRUE), but it invisibly returns the help page as a single character string.

Octave Documentation for <em>help</em>

[results=rd,stage=render]{if( .Platform$OS.type != 'windows' || .Platform$r_arch != 'x64' ) RcppOctave::o_help(help, format='rd')}

[Generated from Octave-RcppOctave::o_version() on Sys.time()]

Octave Documentation for doc
{

[results=rd,stage=render]{if( .Platform$OS.type != 'windows' || .Platform$r_arch != 'x64' ) RcppOctave::o_help(doc, format='rd')}

[Generated from Octave-RcppOctave::o_version() on Sys.time()] # roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE)

if( interactive() ){ o_help <- function(..., show=FALSE){ RcppOctave::o_help(..., show=show) } }

o_help(print) o_help(rand) # or equivalently o_help('rand')

# to include in Rd files, use argument rd=TRUE in an \Sexpr: \Sexpr[results=rd,stage=render]{RcppOctave::o_help(rand, format='rd')}

# to see the included Rd code o_help(rand, format=TRUE) o_help(rand, format='HTML') o_help(rand, format='latex')

try({ # may throw an error if Octave documentation is not installed

o_doc(text) # or equivalently o_doc('text')

})