o_addpath: Manipulating Octave Search Path

Description Usage Arguments Details Value Octave Documentation for addpath See Also Examples

View source: R/base-functions.R

Description

Adds a directory at the beginning of Octave search path.

o_inpath tells if a directory or files are in Octave path.

Usage

1
2
3
o_addpath(DIR1, ..., OPTION = "-begin")

o_inpath(...)

Arguments

DIR1

path specification to add to Octave search path. See section Octave Documentation.

...

other path specifications

OPTION

option that specifies how the path should be added. Possible values are: '-begin', 0, '-end', 1. See section Octave Documentation.

Details

The .oct files present in directories from the search path are looked up when an object or function is requested but not loaded in the current session. The files are watched and automatically reloaded in case modification.

Value

returns invisibly the old value of search path.

Octave Documentation for addpath

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

[Generated from Octave-\Sexpr{RcppOctave::o_version()} on \Sexpr{Sys.time()}]

See Also

Other Octave_files: o_source

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# call an undefined function
try(.CallOctave('fun1'))

# add to the path a directory with a .oct file that contains a definition for 'fun1'
o_addpath(system.file('scripts', package='RcppOctave'))

# re-call the function
#.CallOctave('fun1')

# change the .oct file

o_addpath(tempdir())
o_inpath(tempdir())
o_inpath(tempfile())

RcppOctave documentation built on May 29, 2017, 11:31 a.m.