Jump to content
  • Using Spotfire® Enterprise Runtime for R with ESS in Emacs


    This article outlines the steps for using Spotfire® Enterprise Runtime for R with ESS in Emacs.

    The attached file defines Spotfire® Enterprise Runtime for R customizations for ESS. (available from http://ess.r-project.org/), allowing access to a Spotfire Enterprise Runtime for R engine through Emacs. This file has been tested on the following systems:

    Windows Linux
    Spotfire Enterprise Runtime for R 6.1.1 Spotfire Enterprise Runtime for R 6.1.1
    ESS-13.09 and ESS-16.10 ESS-13.09 and ESS-16.10
    GNU Emacs 24.3.1 GNU Emacs 24.3.1 and GNU Emacs 24.5.1


    See the attached file for installation instructions, information about differences between using Spotfire Enterprise Runtime for R and R in ESS, and a list of known issues.

    NOTE:  To use the attached file, save it as ess-terr-d.el

    For Windows users, we have included the following instructions for your convenience.


    Configuring ESS in Emacs for Spotfire Enterprise Runtime for R

    1. Locate your installation of Spotfire Enterprise Runtime for R.
      If you are using the engine in Spotfire, look for the path at 
       SPOTFIRE_HOME/modules/Spotfire Enterprise Runtime for R_<version>/engine/bin/TERR.exe.
       
    2. If you do not already have ESS in Emacs for Microsoft Windows installed, download and install it now.
    3. Start Emacs for Microsoft Windows.
    4. Create a .emacs configuration file in ESS (press Ctrl-x, and then Ctrl-f and type in ~/.emacs. ). Alternatively, you can create this file using your favorite text editor.
    5. Modify your Emacs installation as follows. If you cannot modify your Emacs installation, see the note below.
      1. Paste the following into the .emacs configuration file:
        ;; load ess however you normally do
        (require 'ess-site)
        ;; specify TERR executable location (TERR.exe on Windows, TERR on Linux)
        (setq inferior-TERR-program-name "C:/TERR/image.20131023/bin/TERR.exe")
        ;; create autoload defns
        (autoload 'TERR "ess-terr-d" "Call 'TERR'." t)
        (autoload 'TERR-mode "ess-terr-d" "Major mode for editing TERR source." t)
        (autoload 'terr-mode "ess-terr-d" "Major mode for editing TERR source." t)
         
      2. If ESS is unpacked in the directory EMACS_HOME/site-lisp/ess-13.09/, store the attached ess-terr-d.el file in EMACS_HOME/site-lisp/ess-13.09/lisp/ess-terr-d.el.

        (This step specifies using the Spotfire Enterprise Runtime for the R engine instead of the R engine.)

    NOTE: If you cannot modify your Emacs installation, follow these steps.

    1. Paste the following into the .emacs configuration file.
      ;; load ess however you normally do
      (require 'ess-site)
      ;; specify TERR executable location (TERR.exe on Windows, TERR on Linux)
      (setq inferior-TERR-program-name "C:/TERR/image.20131023/bin/TERR.exe")
      ;; load ess-terr-d file explicitly
      (load "~/ess-terr-d"
       
    2. Save the attached ess-terr-d.el file into the same directory as your .emacs file. Or if you choose to save it in another location, change the line (load "~/ess-terr-d") to give the full path to the ess-terr-d.el file.


    Running Emacs using Spotfire Enterprise runtime for R console

    1. Start Emacs.
    2. Press Esc-x, and then type TERR and press Enter.
    3. Press Enter again when prompted (at the bottom of the Emacs window) for a starting data directory, or specify a different directory.

    The Spotfire Enterprise Runtime for the R console should have started.


    References

    Emacs Speaks Statistics (ESS) is an add-on package for emacs text editors such as GNU Emacs and XEmacs. It is designed to support the editing of scripts and interaction with various statistical analysis programs such as R, S-Plus, SAS, Stata and JAGS. Although all users of these statistical analysis programs are welcome to apply ESS, advanced users or professionals who regularly work with text-based statistical analysis scripts, with various statistical languages/programs, or with different operating systems might benefit from it the most.

    To obtain more information ESS (including download links), please see their website at: http://ess.r-project.org/

     

    Attachment Size
     ess-terr-d.el_.txt 7.47 KB

    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...