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 gives access to the full R environment.
| R 2.12.1 | AllegroCL 8.2 | CLISP 2.49 | ClozureCL 1.6 | CMUCL 20b | ECL 11.1.1 | LispWorks 6.0.1 | SBCL 1.0.44 |
|---|---|---|---|---|---|---|---|
| Windows/x86 | |||||||
| Linux/x86 | OK [1] | OK [1] | |||||
| MacOSX/x86 | OK | OK | OK [1] | OK | OK | OK | OK [1] |
| MacOSX/PPC |
| R 2.9 | AllegroCL 8.1 | CLISP 2.47 | ClozureCL 1.3 | CMUCL 19f | ECL 9.4.1 | LispWorks 5.1.1 | SBCL 1.0.26 |
|---|---|---|---|---|---|---|---|
| Windows/x86 | OK | OK | OK | n/a | OK | OK | OK |
| Linux/x86 | OK | OK | OK | OK | OK | OK | OK |
| MacOSX/x86 | OK | no FFI | OK [1] | OK | (r-init) crashes | OK | OK [1] |
| MacOSX/PPC | OK | OK | OK | OK | OK [2] | OK | OK |
A success means only that some basic operations work, no extensive testing is performed on any platform.
Download: rcl.tar.gz (older snapshots rcl-081007.tgz, 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") or (ql:quickload :rcl)Most likely you'll need to edit the library path in config.lisp; if rcl:*r-lib-loaded* is nil, try (cffi:load-foreign-library *r-lib*) to see what's the problem (see init.lisp).
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"))
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).
In its current state it might be possible to use RCL successfully for simple tasks, but there are a number of issues: