Octave Home Directory

Description

Returns the path to Octave home directory, i.e. the directory that contains the bin/ sub-directory where Octave binaries can be found, e.g., typically /usr/ on Linux machines.

Usage

Octave.home(..., configure = FALSE, use.system = TRUE)

Arguments

...
character strings that are appended to Octave path via file.path.
configure
logical that indicates if one should directly return the path that was used when configuring (i.e. installing) RcppOctave
use.system
logical that indicates if one should try using octave-config to retrieve Octave home directory. This would be done as a last resort, if the path could not be determined in any other ways (see Details).

Value

a character string, or NULL if the path was not found.

Details

The path to Octave home directory is determined in the following order:

  • value of global option 'octave.home';
  • value of the environment variable 'OCTAVE_HOME';
  • path used during configuration/installation of RcppOctave.
  • path returned by octave-config, which is itself looked up in the system PATH.

If set, the global option or environment variable should contain the absolute path to Octave root directory.

Examples


## Don't show: 
# roxygen generated flag
options(R_CHECK_RUNNING_EXAMPLES_=TRUE)
## End Don't show

Octave.home()
## [1] "/usr"