rincanter.core
connect-to-rserve
(connect-to-rserve)
Initialize the jri engine. This can only be done once in the
lifetime of the jvm-- not our rules- that's how the embedded R engine
seems to want things.
get-r-connection
(get-r-connection)
Get the jri-engine. If it doesn't exist, create it using the
default init-jri-engine function and return it.
r-eval
(r-eval expression)
Eval expression in the R engine. Convert the return value from
JRI/R to Clojure
r-eval-no-catch
(r-eval-no-catch expression)
Eval expression in the R engine. Will not catch any exceptions that
happen during evaluation
r-eval-raw
(r-eval-raw expression)
Eval expression in the R engine. Just return the raw JRI/R wrapper,
don't convert to Clojure object
r-get
(r-get r-name)
Retrieve the value with this name in the R engine
r-get-raw
(r-get-raw r-name)
Retrieve the value with this name in the R engine. Do not convert
from JRI to Clojure type.
r-inspect
(r-inspect obj)
Runs str(object) on the R side, capturing console output. Runs
println on returned Strings
r-install-CRAN
(r-install-CRAN package)
(r-install-CRAN package repo)
Tries to install the provided package using the optionally provided
repository or the master CRAN repository
r-set!
(r-set! r-name value)
Assign r-name to value within the R engine
r-try-parse-eval
(r-try-parse-eval expression)
Eval expression in the R engine, wrapped (on the R side) in
try/catch. Will catch errors on the R side and convert to Exception
and throw
with-r-eval
macro
(with-r-eval & forms)
Evaluate forms that are string using r-eval, otherwise, just eval
Clojure code normally
with-r-eval-no-catch
macro
(with-r-eval-no-catch & forms)
Evaluate forms that are string using r-eval-no-catch, otherwise, just eval
clojure code normally
with-r-eval-raw
macro
(with-r-eval-raw & forms)
Evaluate forms that are string using r-eval-raw, otherwise, just eval
Clojure code normally
with-r-try-parse-eval
macro
(with-r-try-parse-eval & forms)
Evaluate forms that are string using r-try-parse-eval, otherwise
just eval Clojure code normally