Giter Site home page Giter Site logo

jharner / rxlisp Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 3.27 MB

An XLisp-Stat package for R

HTML 0.10% Dockerfile 0.01% Assembly 0.04% R 0.11% Shell 0.82% CSS 0.04% Common Lisp 19.51% NewLisp 0.11% C 61.80% Makefile 0.55% Objective-C 0.63% TeX 2.81% PostScript 13.33% Emacs Lisp 0.08% Gnuplot 0.05%

rxlisp's Introduction

RXLisp

An XLisp-Stat package for R

This is based on original work done by Duncan Temple Lang

This is an approach to creating an embedded version of XLisp-Stat which can be dynamically loaded into other applications. Specifically, we create an interface between R and XLisp which allows XLisp to be loaded into R as a regular package.

Currently, this works on Unix. Work will be needed to configure the changes to XLisp for other platforms. Similarly, event loop integration will be needed for the different platforms. Fortunately, I am currently investigating a general framework for this for R.

--- Added by Jim Harner

To build and run the Docker image:

  1. To build the docker image:

cd docker build -t rxlisp .

  1. To run the image:

docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix rxlisp

--- Added by Jun Tan

A version of xlisp with added option to be built as a shared library is included here under xlisp folder.

To build libxlisp.so:

  1. change directory to xlisp
  2. run command ./configure
  3. run command make libxlisp.so

Once libxlisp.so is built, copy it to appropriate directory and/or set environment variable LD_LIBRARY_PATH so that it can be found by dynamic loader.

Then install RXLisp by running command: R CMD INSTALL RXLisp (This step is not verified yet as there were compilation errors

--- End

To install this software, you will need to apply the necessary changes to XLisp-Stat and build that as a shared library. The new files are located in the xlisp/ directory. There is a script in the xlisp/ directory that does this for you. It can be invoked simply as

setenv XLISP_SRC_DIR cd xlisp/ ./install

This script can be automatically invoked via the configuration of the R package using

setenv XLISP_SRC_DIR R CMD INSTALL --configure-args='--with-build-xlisp-dll' RXLisp

What the script does is simply copy the modified versions of the XLisp files to the top-level XLisp source directory and then run the commands

cd configure make libxlisp.so

To do this using the install script in the xlisp/ directory, you must specify the location of the XLisp-Stat source by setting the environment variable XLISP_SRC_DIR.

Having built the library, the R package can be built.

To run R and load this package, you will need to make libxlisp.so available to the system's dynamic loader. You can do this by installing libxlisp.so in a directory the system searches and re-running /sbin/ldconfig to rebuild the cache of available shared libraries. Alternatively, one can include the directory containing the shared library in the LD_LIBRARY_PATH environment variable.

Steps for building RXLisp

  1. Build shared library for xlisp a. I have copied xlisp source code and the update into xlisp directory. b. Change directory to xlisp: cd xlisp c. Run configuration script: ./configure d. Build xlisp shared library: make libxlisp.so e. Copy the libxlisp.so file to appropriate location. (I haven't figure out this yet. I tried /usr/local/lib. It seems not working although ldconfig it show up in ldconfig cache.)
  2. Install RXLisp library a. Go back to project base b. Install RXLisp: R CMD INSTALL RXLisp <-l path-to-local-r-library-folder> The -l part is optional. Use that when you want to install the package in a location different to the standard one.

------ Options for communication between R processes

  1. Share information through file system.
  2. For unix, pipe/message queue/shared memory.
  3. Network connection. Processes don't have to be on the same machine.

rxlisp's People

Contributors

jforce716 avatar jharner avatar

Watchers

James Cloos avatar  avatar

Forkers

meiynajim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.