Hi,

I have just finished the initial code for managing a R session from guile
and you can find the project at,

https://gitlab.com/snorgers1/guile-r

Here is the README

GUILE-R

This is a thin wrapper towards an embedded R session

Example

(use-modules (language r))
(define v (make-rvector "x" 'integer '(1 2 3 4)))
(vec-to-r v env)
(Rf_PrintValue (evalR "x" env))
[1] 1 2 3 4

(Rf_PrintValue (evalR "y <- 1+2" env))
[1] 3

(r-to-vec "y" env)
3

(evalR "z <- c('a','b','c')" env)

(r-to-vec "z" env)
#<rvector id="z" type=string data=("a" "b" "c")>

Regards
Snorgers

Reply via email to