o_eval
calls.o_eval(..., CATCH, unlist = TRUE)
...
fails. See section Octave Documentation for more details.[Generated from Octave-
# assign some variable o_eval("a=10")
# retrieve its value in a subsequent call o_eval("a") stopifnot( identical(o_eval("a"), 10) ) o_get('a')
# use its value o_eval("b = a^2") stopifnot( identical(o_eval("b = a^2"), 100) )
# multiple expression can be evaluated o_eval(a="10^3", singular="svd(rand(4,4))", random="rand(10, 1)") # or from a list l <- list(a="10^3", singular="svd(rand(4,4))", random="rand(10, 1)") o_eval(l)
# if the evaluation fails then an error is thrown o_eval("a=svd()")
# except if argument CATCH is provided o_eval("a=svd()", CATCH="a=2") stopifnot( identical(o_eval("a"), 2) )