[Rd] possibility of R/Maxima linking
Robert Dodier
robert.dodier at gmail.com
Wed Aug 3 04:34:07 CEST 2005
Hello,
I'm aware that recently there has been discussion of R joining forces with
an algebra system in some way. Here is my $0.02.
I suggest linking R with Maxima (http://maxima.sf.net).
Maxima is written in Lisp. Maxima objects are pretty simple.
Maxima works on expressions, and almost every expression
is a Lisp list of the form ((op) arg1 arg2 arg3 ...) which
associates an operator and its arguments. Every kind of
operation is cast in this form -- infix, prefix, postfix, function
calls, array references, lists, and even control structures
such as if-then-else and do-loops.
Maxima usually parses an input written in the Maxima language
(yet another Algol derivative) and then calls MEVAL,
the main evaluation function, with the Lisp representation
of the input as its argument. However, if R could construct
a suitable Lisp object, R could bypass the parsing
and just call MEVAL directly.
Although several interfaces which are based on sockets
have been created, I believe it should be possible to directly
link Maxima with R, if Maxima is compiled with a Lisp
variety which is implemented in C. I believe direct linkage
is possible with Clisp, and maybe with GCL as well.
Whether or not this scheme works depends pretty strongly
on how much effort is needed to munge R objects into Lisp.
Maybe someone has some comments about that.
There is more that can be said but I'll let this be enough for now.
all the best,
Robert Dodier
More information about the R-devel
mailing list