Skip to content

kvasilopoulos/octaver

Repository files navigation

octaver

CRAN status Lifecycle: experimental R-CMD-check Codecov test coverage

The goal of octaver is to provide an interface to Octave

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("kvasilopoulos/octaver")

Session

library(octaver)
find_octave()
#>                                           octave-cli 
#> "C:\\Octave\\OCTAVE~1.0\\mingw64\\bin\\OCC5B3~1.EXE"

## basic example code
pr <- OctaveSession$new()
pr$eval("2+2")
#> ans  =  4

pr$eval("A = 2+2")
#> A  =  4
pr$eval("A")
#> A  =  4

pr$kill()
#> Octave Session, finished, pid 10996.

REPL

Knitr engine

A = 1;
A
#> A
#>  =  1

API

Various .m scripts

m_

Run

oct_run(): oct_addpath():

Session & Repl

oct_session(): oct_repl():

Knitr

set_oct_engine():

Read & Write

write_mat(): read_mat():

Installation helpers

install_oct(): install_pkg():

Other helpers

has_octave(): octave_path(): find_octave(): list_pkgs():