RCL uses CFFI to communicate with the R environment, RCLmath links with libRmath and makes some functions accessible in a much simpler way. The code is available under the MIT license. Note that there is another project working on communication between Common Lisp and R: RCLG.
This package give access to the full R environment.
| R 2.7 | AllegroCL 8.1 | CLISP 2.46 | ClozureCL 1.2 | CMUCL 19e | ECL 0.9l | LispWorks 5.1 | SBCL 1.0 |
|---|---|---|---|---|---|---|---|
| Windows/i386 | OK | OK | NA | NA | OK | OK | OK |
| Linux/i386 | OK | OK | NA | fails | OK | OK | fails |
| MacOSX/i386 | OK | no FFI | [64-bit] fails | fails | FFI fails | fails | OK |
| MacOSX/PPC | OK | OK | fails | OK | no DFFI | fails | OK |
A success means only that some basic operations work, no extensive testing is performed on any platform.
The failures seem to have the same origin (except on ECL, where the dynamic libraries can't be loaded). Somehow we can't find anything in the R environment: (r-header *r-globalenv*) returns in all these failing combinations (4 0 0 32768 0 0 0 0 0 0) (in working systems we get (4 0 2 32768 1 0 0 0 0 0), where the numbers correspond to the fields in the header: (TYPE OBJ NAMED GP MARK DEBUG TRACE FIN GCGEN GCCLS)).
When decoding an object with attributes, the list of attributes is returned as a secondary value (it's also possible to print attributes to standard-output whenever encountered decoding an object, to be aware of their existence).
Download: rcl.tar.gz (older snapshots rcl-080628.tgz, rcl-070316.tgz, rcl-060716.tgz,rcl-060703.tgz,rcl-060623.tgz).
(asdf-install:install "http://common-lisp.net/project/rcl/rcl.tar.gz")
CL-USER> (in-package :rcl) #<PACKAGE "RCL"> R> (r-init) T R> (r "R.Version") ("i386-apple-darwin8.10.1" "i386" "darwin8.10.1" "i386, darwin8.10.1" "Patched" "2" "6.0" "2007" "10" "03" "43075" "R" "R version 2.6.0 Patched (2007-10-03 r43075)") ((:NAMES "platform" "arch" "os" "system" "status" "major" "minor" "year" "month" "day" "svn rev" "language" "version.string"))
In its current state it might be possible to use RCL successfully for simple tasks, but there are a number of issues: