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)).

Usage

.O

S4 (Octave)
`$`(x, name)

S4 (Octave)
`[[`(x, i, exact = TRUE)

S4 (Octave)
`$`(x, name) <- value

Arguments

exact
logical not used.
x
object from which to extract element(s) or in which to replace element(s).
name
A literal character string or a name (possibly backtick quoted). For extraction, this is normally (see under ‘Environments’) partially matched to the names of the object.
i
indices specifying elements to extract or replace. Indices are numeric or character vectors or empty (missing) or NULL. Numeric values are coerced to integer as by as.integer (and hence truncated towards zero). Character vectors will be matched to the names of the object (or for matrices/arrays, the dimnames): see ‘Character indices’ below for further details. For [-indexing only: i, j, ... can be logical vectors, indicating elements/slices to select. Such vectors are recycled if necessary to match the corresponding extent. i, j, ... can also be negative integers, indicating elements/slices to leave out of the selection. When indexing arrays by [ a single argument i can be a matrix with as many columns as there are dimensions of x; the result is then a vector with elements corresponding to the sets of indices in each row of i. An index value of NULL is treated as if it were integer(0).
value
typically an array-like R object of a similar class as x.

Format

.O is an object of class Octave-class.

Methods

  1. [[signature(x = "Octave"): The method [[ provides an alternative way of retrieving Octave objects, and is equivalent to o_get(name).

  2. $signature(x = "Octave"): 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).

  3. $<-signature(x = "Octave"): The method $<- allow to directly assign/set Octave variables via e.g. .O$a <- 10.

See also

o_get o_get