You are looking at historical revision 27596 of this page. It may differ significantly from its current revision.
R
R interface for Chicken Scheme
Overview
R provides a simple way to call R-functions, consisting of the following two forms: R and R*. R evaluates an R-expression, returning an opaque R-pointer that can be passed to other R-functions. Use this, for instance, when you don't need to modify the object in Scheme.
R*, on the other hand, evaluates the expression and tries to translate it into Scheme; it understands NULL, lists, strings, reals, bools, complex numbers and symbols. Everything else is opaque.
Documentation
R
[syntax] (R expression) → R-objectEvaluate an R-expression; for instance, (R (rnorm 2)) => #<tagged pointer sexp 1f40818>.
- expression
- The expression to evaluate
(define-syntax
R
(lambda (expression rename compare)
(list 'apply 'R-eval (list 'quasiquote (cdr expression)))))
R*
[syntax] (R* expression) → Scheme-objectEvaluate an R-expression and translate it into Scheme; for instance, (R* (rnorm 2)) => #(-0.0740060993626383 -1.77269881184448).
- expression
- The expression to evaluate
(define-syntax
R*
(lambda (expression rename compare) `(R->scheme (R ,@(cdr expression)))))
About this egg
Author
Colophon
Documented by cock.