Description Usage Arguments Slots Examples
Wrapping and Defining Octave Functions from R
OctaveFunction
objects can be created from existing Octave function
using their name, or directly from their Octave implementation.
In this case, the Octave code is parsed to extract and use the name of the first
function defined therein.
1 | OctaveFunction(fun, check = TRUE)
|
fun |
the name of an existing Octave function or, Octave code that defines a function. |
check |
logical that indicates if the existence of the Octave function
should be checked.
If function does not exist then, an error or a warning is thrown if |
name
name of the wrapped Octave function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | osvd <- OctaveFunction('svd')
osvd
osvd(matrix(1:9,3))
orand <- OctaveFunction('rand')
orand()
orand(2)
orand(2, 3)
# From source code
myfun <- OctaveFunction('function [Y] = somefun(x)
Y = x * x;
end
')
myfun
myfun(10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.