Learn R Programming

RcppOctave (version 0.18.1)

.O: Direct Interface to Octave

Description

RcppOctave provides a simple interface to Octave via the object .O, an instance of class Octave, that allows for direct access to Octave functions and variables using calls such as: .O$svd(matrix(1:9,3)).

The method $ provides a direct way of calling Octave functions or retrieving variables from Octave base context, via e.g. .O$svd(x) or .O$a. It is equivalent to o_get(name).

The method $<- allow to directly assign/set Octave variables via e.g. .O$a <- 10.

The method [[ provides an alternative way of retrieving Octave objects, and is equivalent to o_get(name).

Usage

.O
"$"(x, name)
"$"(x, name) <- value
"[["(x, i, exact = TRUE)

Arguments

x
an OctaveInterface object. Essentially used with x = .O.
name
name of the Octave obj ect to retrieve or assign.
value
value to assign to the Octave object.
i
name of the Octave object to retrieve.
exact
logical not used.

Format

.O is an object of class Octave.

See Also

o_get

o_get

Examples

Run this code


.O
# assign/get Octave variables
.O$a <- 10
.O$a

# call Octave functions
.O$help()
.O$svd(matrix(runif(9), 3))

Run the code above in your browser using DataLab