Go to the first, previous, next, last section, table of contents.


Introduction to ESS

The S and Splus packages provide sophisticated statistical and graphical routines for manipulating data. S-mode, the package on which ESS was based, provided a programming environment for data analysis and statistical programming, as well as an intelligent interface to the S process.

The ESS (:= Emacs Speaks Statistics) package is an extension of S-mode to provide a common, generic, and useful interface, through Emacs, to many statistical packages. It has currently been extended for R, XLisp-Stat, and SAS, with other statistical languages such as Stata, SPSS, and Fiasco slated for implementations in the future.

A bit of notation before we begin. Emacs refers to both Emacs as distributed by the Free Software Foundation, as well as XEmacs, which is a second GNU version of Emacs. The Emacs major mode ESS[language] which is used for editing source for dialect language, can take values S, SAS, or XLS, for instance. The inferior process interface (the connection between Emacs and the running process) referred to as interactive ESS (iESS), is denoted in the modeline by ESS[dialect], where dialect can take values S3, S4, S+3, R, XLS, VST, SAS, as well as others.

Currently, the documentation contains many references to `S' where actually any supported (statistics) language is meant, i.e., `S' could also mean `XLisp-Stat' or `SAS'.

For exclusively interactive users of S, ESS provides a number of features to make life easier. There is an easy to use command history mechanism, including a quick prefix-search history. To reduce typing, command-line completion is provided for all S objects and "hot keys" are provided for common S function calls. Help files are easily accessible, and a paging mechanism is provided to view them. Finally, an incidental (but very useful) side-effect of ESS is that a transcript of your session is kept for later saving or editing.

No special knowledge of Emacs is necessary when using S interactively under ESS.

For those that use S in the typical edit--test--revise cycle when programming S functions, ESS provides for editing of S functions in Emacs edit buffers. Unlike the typical use of S where the editor is restarted every time an object is edited, ESS uses the current Emacs session for editing. In practical terms, this means that you can edit more than one function at once, and that the ESS process is still available for use while editing. Error checking is performed on functions loaded back into S, and a mechanism to jump directly to the error is provided. ESS also provides for maintaining text versions of your S functions in specified source directories.

Why should I use ESS?

S is a powerful system for manipulating and analyzing data, but its user interface -- particularly on Unix platforms -- leaves something to be desired. ESS is a package which is designed to make S easier to use.

ESS provides several features which make it easier to interact with the ESS process (i.e. enter commands and view the output). These include:

If you commonly create or modify S functions, you will have found the standard facilities for this (the `fix()' function, for example) severely limiting. Using S's standard features, one can only edit one function at a time, and you can't continue to use S while editing. ESS corrects these problems by introducing the following features:

Finally, ESS provides features for re-submitting commands from saved transcript files, including:

New features in ESS

Beginning with ESS 5.1.2 we are able to use inferior iESS mode to communicate directly with a running S-Plus 4.x process using the Microsoft DDE protocol. We use the familiar (from Unix ESS) C-c C-n and related key sequences to send lines from the S-mode file to the inferior S process. We continue to edit S input files in ESS[S] mode and transcripts of previous S sessions in ESS Transcript mode. All three modes know the S language, syntax, and indentation patterns and provide the syntactic highlighting that eases the programming tasks.

For Microsoft platforms, the version of Emacs that this has been tested with is NTEmacs 20.2 and 20.3. More information about NTEmacs can be retrieved from:

including information on retrieval and installation. This has not yet been tested with XEmacs for Microsoft Windows 95/98/NT.

Authors of and contributors to ESS

ESS is based on Olin Shivers' excellent comint package (which is supplied with version 19 of GNU Emacs). The original version of ESS (then known as `S-mode') was written by Doug Bates (bates@stat.wisc.edu) and Ed Kademan (kademan@stat.wisc.edu). Frank Ritter (ritter@psy.cmu.edu) then merged this version with his own S-mode mode to form `S.el' version 2.1.

Version 2.1 of `S.el' was then updated and expanded by David Smith to form version 3.4. This was then updated for Emacs 19 to create version 4. Most bugs have now been fixed (and several new ones introduced) and many new features have been added. Thanks must go to the many people who have helped with the development of the present version of ESS:

The new version, ESS version 5, is being developed and currently maintained by

Getting the latest version of ESS

The latest (beta) versions are always available

Check the README file first to see which files you need.

Note that all new user-visible features to versions of ESS are documented in the `Doc/NEWS' file; all changes are listed in the `ChangeLog' file.

How to read this manual

If ESS has already been installed on your system, the next chapter has details on how to get started using S under ESS.

If you need to install ESS, read section Installing ESS on your system for details on what needs to be done before proceeding to the next chapter.

section Customizing ESS provides details of user variables you can change to customize ESS to your taste, but it is recommended that you defer this section until you are more familiar with ESS.

Don't forget that this manual is not the only source of information about ESS. In particular, the mode-based online help (obtained by pressing C-h m when in the process buffer, edit buffer or help buffer) is quite useful. However the best source of information is, as always, experience -- try it out!


Go to the first, previous, next, last section, table of contents.