This is the README file for the distribution of ESS version
12.03
ESS is a GNU Emacs and XEmacs mode for interactive statistical programming and data analysis. Languages supported: the S family (S, S-PLUS and R), SAS, BUGS/JAGS, Stata and XLispStat. ESS grew out of the desire for bug fixes and extensions to S-mode and SAS-mode as well as a consistent union of their features in one package.
Installation instructions are provided in sections for both Unix and Windows; see below.
The current development team is led by Martin Maechler since August 2004. Former project leader A.J. (Tony) Rossini (rossini@blindglobe.net) did the initial port to XEmacs and has been the primary coder. Martin Maechler (maechler@stat.math.ethz.ch) and Kurt Hornik (Kurt.Hornik@R-project.org) have assisted with the S family and XLispStat. Stephen Eglen (stephen@gnu.org) has worked mostly on R support. Richard M. Heiberger (rmh@temple.edu) has assisted with S/S-PLUS development for Windows. Richard and Rodney A. Sparapani (rsparapa@mcw.edu) have done much of the work improving SAS batch and interactive support. Rodney has also extended ESS to support BUGS/JAGS and has an interest in improving Stata support.
We are grateful to the previous developers of S-mode (Doug Bates, Ed Kademan, Frank Ritter, David M. Smith), SAS-mode (Tom Cook) and Stata-mode (Thomas Lumley).
The source and documentation of ESS is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
ESS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in the file COPYING in the same directory as this file for more details.
All recent released versions are meant to be release-quality versions. While some new features are being introduced, we are cleaning up and improving the interface. We know that there are many remaining opportunities for documentation improvements, but all contributors are volunteers and time is precious. Patches or suggested fixes with bug reports are much appreciated!
ESS is most likely to work with current/recent versions of the following statistical packages: R/S-PLUS, SAS, Stata, OpenBUGS and JAGS.
ESS supports current, and recent, stable versions of GNU Emacs (specifically, the 22.x and 23.x series; alpha/beta/pre-release versions are NOT SUPPORTED). XEmacs is currently NOT SUPPORTED, but ESS v. 5.14 should still work (XEmacs stable 21.4.14 or higher).
To build the PDF documentation, you will need a version of TeX Live or texinfo that includes texi2dvi (BEWARE: recent TeX Live, and some texinfo RPMs, do NOT include texi2dvi).
The latest released version of ESS is always available on the web at: ESS web page or StatLib
The latest development version of ESS is available via https://svn.R-project.org/ESS/, the ESS Subversion repository. If you have a Subversion client (see http://subversion.tigris.org/), you can download the sources using:
% svn checkout https://svn.r-project.org/ESS/trunk path
which will put the ESS files into directory path. Later, within that directory, `svn update' will bring that directory up to date. Windows-based tools such as TortoiseSVN are also available for downloading the files. Alternatively, you can browse the sources with a web browser at: ESS SVN site. However, please use a subversion client instead to minimize the load when retrieving.
If you remove other versions of ESS from your emacs load-path, you can then use the development version by adding the following to .emacs:
(load "/path/to/ess-svn/lisp/ess-site.el")
Note that https is required, and that the SSL certificate for the Subversion server of the R project is
Certificate information: - Hostname: svn.r-project.org - Valid: from Jul 16 08:10:01 2004 GMT until Jul 14 08:10:01 2014 GMT - Issuer: Department of Mathematics, ETH Zurich, Zurich, Switzerland, CH - Fingerprint: c9:5d:eb:f9:f2:56:d1:04:ba:44:61:f8:64:6b:d9:33:3f:93:6e:ad
(currently, there is no “trusted certificate”). You can accept this certificate permanently and will not be asked about it anymore.
For a Unix or Unix-like installation, please follow the next steps. Retrieve the latest tgz file (ess-VERSION.tgz) from ESS downloads area.
GNU Emacs Simple Instructions: for recent versions of Emacs (22.x or higher) and ESS, the installation process is simple.
GNU tar % gtar zxf ess-VERSION.tgz -C PREFIX/site-lisp Unix tar % gunzip < ess-VERSION.tgz | tar xf - -C PREFIX/site-lisp
(require 'ess-site)
to ~/.emacs and restart Emacs.
(load "~/ess/ess-VERSION/lisp/ess-site")
in ~/.emacs and restart Emacs.
XEmacs Simple Instructions: for recent versions of XEmacs (21.x or higher) and ESS, the installation process is simple.
%prompt gtar zxf ess-VERSION.tgz # for GNU tar %prompt gunzip < ess-VERSION.tgz | tar xf - # for Unix tar
(require 'ess-site)
to ~/.xemacs/init.el and restart XEmacs.
(load "~/ess/ess-VERSION/lisp/ess-site")
in ~/.xemacs/init.el and restart XEmacs.
Edit the default locations of LISPDIR
, INFODIR
and
ETCDIR
in Section 1 of Makeconf (if you are
using XEmacs, then edit the XEmacs subsection in Section 1).
You can compile those files by:
make all
When that completes successfully, install the compiled files:
make install
For Microsoft Windows installation, please follow the next steps. Retrieve the latest zip file (ess-VERSION.zip) from ESS downloads area.
GNU Emacs Simple Instructions: for recent versions of Emacs (22.x or higher) and ESS, the installation process is simple.
(require 'ess-site)
to ~/.emacs and restart Emacs.
(load "C:/ess/ess-VERSION/lisp/ess-site")
in ~/.emacs and restart Emacs.
XEmacs Simple Instructions: for recent versions of XEmacs (21.x or higher), the installation process is much simpler. Hopefully, these simple instructions will work for you. If not, then more detailed, manual instructions follow.
HOME
environment variable to be defined. You can
create it by visiting the following dialog:
My Computer->Control Panel->System->Advanced->Environment Variables
In the User variables window, press New. And create a variable
named HOME
with a value something like (you must
use forward slashes /
rather than backslashes \
)
c:/Documents and Settings/%USERNAME%/Application Data
. Then press OK for that
window and press OK for the main window. If you also have GNU Emacs
installed, GNU Emacs will recognize HOME
and expand ~
accordingly.
C-x C-f
followed by a ~
.
From the Subdir menu, select Create Directory, and enter .xemacs
(require 'ess-site)
to ~/.xemacs/init.el and restart XEmacs.
(load "C:/ess/ess-VERSION/lisp/ess-site")
in ~/.xemacs/init.el and restart XEmacs.
Now, you should be ready to use ESS. For example, to edit statistical programs, load the files with the requisite extensions (".sas" for SAS, ".S" or "s" or "q" or "Q" for S-PLUS, ".r" or ".R" for R, and ".lsp" for XLispStat). One further step is needed if you wish to run statistical processes, see below.
To run statistical processes under ESS, Windows users will need to make sure that the directories for the software they will be using is in the PATH environment variable.
On Windows NT/2000/XP, add the directories to the PATH using the
My Computer->Control Panel->System->Advanced->Environment Variables
menu.
Note that the directory containing the program is
added to the PATH, not the program itself. One such line is needed
for each software program. Be sure to use the abbreviation
progra~1
and not the long version with embedded blanks as
this may cause problems. Also, make sure to use backslashes \
since Windows requires them.
An alternative, for R users, is that rather than adjusting the PATH variable, you can add the following to your emacs initialization file (and restart emacs):
(setq inferior-R-program-name "c:/progra~1/R/R-2.2.1/bin/Rterm.exe")
This assumes that you have installed R-2.2.1 in the default location. Change the path otherwise to point to other locations.
Windows users who place S-PLUS anywhere other than the default location will also need to add the following three lines (properly adjusted for their location):
(setq-default inferior-S+6-program-name "c:/progra~1/Insightful/SPLUS70/cmd/Splus") (setq-default inferior-Sqpe+6-SHOME-name "c:/progra~1/Insightful/SPLUS70") (setq-default inferior-Sqpe+6-program-name "c:/progra~1/Insightful/SPLUS70/cmd/Sqpe.exe")
The above example uses the default location of S-PLUS in
c:\progra~1\Insightful
. Please note that ESS
considers S-PLUS 6, 7, and 8 to be variants of S+6.
These users may also need to modify the emacs variable ess-SHOME-versions
to match their installation in order to get the full set of S-PLUS versions
on their machine into the ESS menu.
To start the S-PLUS [678].x GUI from ESS under emacs:
M-x S
(or M-x S+6
).
M-x S+6-msdos
C-c C-n
or C-c C-r
keys.
(If you are still using S-PLUS 4.x or 2000,\
then use M-x S+4
or M-x S+4-msdos
.)
To start an S-PLUS [678].x session inside an emacs buffer—and without the S-PLUS GUI:
M-x Sqpe
(or M-x Sqpe+6
).
This works with both the bash and msdos shells.
You will then be asked for a pathname ("S starting data
directory?"), from which to start the process. The prompt will
propose your current directory as the default.
You get Unix-like behavior, in particular the entire
transcript is available for emacs-style search commands.
Send lines or regions from the emacs buffer containing your S
program (for example, myfile.s) to the *S+6* buffer with the
C-c C-n
or C-c C-r
keys.
Interactive graphics are available with Sqpe by using the java
library supplied with S-PLUS 6.1 and newer releases.
Enter the commands:
library(winjava) java.graph()
Graphs can be saved from the java.graph
device
in several formats, but not PostScript. If you
need a PostScript file you will need to open a separate
postscript
device.
(If you are still using S-PLUS 4.x or 2000, then use M-x Sqpe+4
.)
To connect to an already running S-PLUS GUI (started, for example, from the S-PLUS icon):
M-x S+6-existing
or
M-x S+6-msdos-existing
You will then be
asked for a pathname ("S starting data directory?"), from which to
start the process. The prompt will propose your current directory
as the default. ESS will arrange for
communication with the already running S-PLUS GUI using the DDE protocol.
Send lines or regions
from the emacs buffer containing your S program (for example,
myfile.s) to the S-PLUS Commands Window with the
C-c C-n
or C-c C-r
keys.
(If you are still using S-PLUS 4.x or 2000,
then use M-x S+4-existing
or M-x S+4-msdos-existing
.)
If you wish to run R, you can start it with:
M-x R
XLispStat can not currently be run with
M-x XLS
Hopefully, this will change. However, you can still edit with emacs, and cut and paste the results into the XLispStat *Listener* Window under Microsoft Windows.
To start an S session on Unix or on Windows when you use the Cygwin bash shell, simply type M-x S RET.
To start an S session on Windows when you use the MSDOS prompt shell, simply type M-x S+6-msdos RET.
ess-arg-function-offset-new-line
controlling for the indentation of lines immediately following open
'('. This is useful to shift backwards function arguments after a long
function call expression:
a <- some.function( arg1, arg2)
instead of the old
a <- some.function( arg1, arg2)
If '(' is not followed by new line the behavior is unchanged:
a <- some.function(arg1, arg2)
This variable should be set as part of indentation style lists, or in ess-mode hook.
yank
(C-y) command accepts
double argument C-u C-u to paste commands only. It deletes any
lines not beginning with a prompt, and then removes the prompt from
those lines that remain. Useful to paste code from emails,
documentation, inferior ESS buffers or transcript files.
ess-use-eldoc
, ess-eldoc-show-on-symbol
,
ess-eldoc-abbreviation-style
variables for how to change the default
behavior. Note: skeleton-pair-insert-maybe
prohibits eldoc
display, on ( insertion.
ess-mode
now indents and completes,
if there is nothing to indent. Set
ess-first-tab-never-completes-p
to t
to make TAB
never complete on first invocation. Completion mechanism is similar to
the completion in the inferior-ess-mode
– a filename expansion
is tried, if not found ESS completes the symbol by querying the
process.
completion-at-point
. Also in accordance with emacs conventions,
ESS doesn't bind M-TAB for emacs 24 or higher. M-TAB calls the
default complete-symbol
.
Auto
Completion
mode (http://cx4a.org/software/auto-complete/). Three AC
sources ac-source-R-args
, ac-source-R-objects
and
ac-source-R
are provided. The last one combines the previous two
and makes them play nicely together. Set ess-use-auto-complete
to
t
to start using it. Refer to documentation string of
ac-use-auto-complete
for further information.
ess-funname.start
, ess-function-arguments
,
ess-get-object-at-point
. Eldoc and auto-completion integration
are using this system.
ess-switch-to-end-of-ESS
(C-c C-z),
and ess-switch-to-ESS
(C-c C-y): Automatically start the
process whenever needed.
roxy
knows about previewing text version of the
documentation. Bound to C-c C-e t.
ess-tracebug
is now part of ESS:
New Features:
ess-tracebug-inject-source-p
controls this behavior - if t,
always inject source reference, if 'function
, inject only for
functions (this is the default), if nil
, never inject.
During the source injection the value of `ess-eval-visibly-p' is ignored.
ess-developer
to evaluate R
code directly in the package environment and namespace. It can be
toggled on and off with C-c d t. When ess-developer
is on
all ESS evaluation commands are redefined to evaluate code in
appropriate environments. Add package names to the list of your
development packages with C-d a, and remove with C-d
r. Source the current file with C-d s.Evaluation function which
depend on `ess-eval-region'
ask for the package to source the
code into, ess-eval-function
and alternatives search for the
function name in the development packages' environment and namespace and
insert the definition accordingly. See the documentation section
“Developing with ESS/ESS developer” for more details.
New Features:
ess-switch-to-end-of-ESS
.
This is consistent with emacs behavior help and other special buffers (breaking change).
special-mode-map
as sugested by Sam Steingold.
ess-display-index
bound to
i in help mode map.
ess-display-vignettes
bound to
v in help mode map.
ess-display-help-in-browser
bound to
w in help mode map. It depends on R
's browser
option.
ess-help-pop-to-buffer
: if non-nil
ESS help buffers are given focus on display. The default is
t
(breaking change).
ess-help-kill-bogus-buffers
now defaults to
t
. Beware, there may be instances where the default is unsatisfactory
such as debugging and/or during R development. Thanks to Ross Boylan for
making the suggestion, Sam Steingold for reminding us of this variable and
Martin Maechler for the warning.
IDO
completing read functionality
for all the interactive requests. It uses ido completion
mechanism whenever available, and falls back on classical
completing-read otherwise. You can set ess-use-ido
to nil if you
don't want the IDO completion. See the documentation string of
ess-use-ido
for more information about IDO
and ESS
configuration.
`ess-handy-commands'
list. If ess-R-smart-operators
is t `ess-smart-comma
also inserts “ “ after comma.
R
: Variable `ess-handy-commands'
stores an alist of useful commands which are called by ess-smart-comma
in
the inferior buffer.
Currently containing:
ess-change-directory
ess-display-index
ess-display-help-on-object
ess-display-vignettes
ess-execute-objects
ess-execute-search
ess-execute-screen-options
ess-install.packages
ess-library
ess-setRepositories
ess-sos
Handy commands: ess-library
, ess-install.packages
, etc -
ask for item with completion and execute the correspond
command. ess-sos
is a interface to findFn
function in
package sos
. If package sos
is not found, ask user for
interactive install.
ess-tracebug
and developer status of ess-developer
in all
associated buffers.
ess-completing-read
mechanism: ESS uses
ido
completions whenever possible. Variable ess-use-ido
controls whether to use ido completion or not. Active by default.
inferior-ess-S-prompt
to
customize prompt detection regular expression in the inferior ESS
buffers. You can customize this variable to enhance comint navigation
(comint-previous-prompt
and comint-next-prompt
) the
inferior buffers.
R
completion retrieval
(ess-R-complete-object-name
) was rewritten and is faster now.
ess-process-get
and ess-process-set
.
>
. This could be overwritten by setting
inferor-ess-primary-prompt
.
R
: Saved command history:
ess-history-file now accepts t
(default), nil
, or a
file name. By setting it to nil
no command line history is saved
anymore. ess-history-directory now allows to have the history
all saved in one “central” file.
ess-get-words-from-vector
and ess-command
.
Changes/New Features in 5.14:
ess-swv-plug-into-AUCTeX-p
Commands to Sweave current file and LaTeX the result are now available
to AUCTeX users, if this variable is set to t
.
ess-eval-function-or-paragraph-and-step
) is now skipping over
comments as the other paragraph functions do.
It (and similar functions) should no longer wrongly find
‘function()’ beginnings inside comments or strings.
Changes/New Features in 5.13:
use-dialog-box
variable is no longer temporarily changed (to nil
for R-x.y.z version
functions and to t
for R itself), but rather the user
customization is obeyed.
Changes/New Features in 5.12:
Changes/New Features in 5.11:
ess-swv-pdflatex-commands
, the first of
which is taken as default and that defaults to texi2pdf.
setwd(..)
to the S process
to set the working directory to the one of the source file.
Changes/New Features in 5.10:
ess-dirs
. This function will set Emacs's current
directory to be the same as the *S* process. This is useful if you use
setwd()
within a *S* process.
Changes/New Features in 5.9:
ess-default-style
, ess-own-style-list
and the documention
subsection “Changing indentation styles”.
nil
, whenever
ess-font-lock-mode is non-nil, i.e., by default.
help.start()
for
navigating R documentation, using the browse-url Emacs
function.
Changes/New Features in 5.8:
RSiteSearch()
that uses the browse-url function, so
results can be viewed in an Emacs web browser.
Changes/New Features in 5.7:
Changes/New Features in 5.6:
Changes/New Features in 5.4:
make-regexp
to regexp-opt
for font-locking is
complete. The new regexp-opt
is now the default since
it is better than the old code in many ways (and especially more
maintainable). However, there are certainly some special
cases missed (bug reports and patches welcome!).
Setting ess-sas-run-regexp-opt
to nil
will result
in the old code being used.
=
now results in
<-
.
(ess-r-args-show)
now
uses the new (tooltip-show-at-point)
contributed by Erik Iverson.
ess-change-directory
for setting both
emacs' current directory and the directory of an *R* or *S* buffer.
Changes/New Features in 5.3.11:
Changes/New Features in 5.3.10:
Changes/New Features in 5.3.9:
*R*
) and transcript modes no longer
fontify language keywords (such as for
, in
, etc).
ess-sta-delimiter-friendly
setting
to t
to convert embedded semi-colons to newlines for Stata processing.
ess-mode
and noweb-mode
.
M-x comment-region
now available!
ess-swv-*
commands (and keybindings) are now in
a submenu of the “Noweb” menu, when editing Sweave files.
Changes/New Features in 5.3.8:
ess-sas-submit-command
and
ess-sas-submit-command-options
now recognized by ess-sas-submit-region
ess-r-args-auto-show
).
ess-eval-function-or-paragraph-and-step
).
system
command in version 1.0.3; specify whether
this command is available via ess-jags-system
; if not
present, then no links are created so that the *shell*
buffer does not become unresponsive during the batch run
Changes/New Features in 5.3.7:
ess-default-style
now *is* customizable, i.e.,
changing its value in ~/.emacs now does have the desired effect.
ess-font-lock-mode
is a new variable (default: t)
which controls whether font-locking is enabled in ESS buffers.
ess-sas-submit-command-options
which is buffer-local; portable
snooze for MS Windows via customize-able ess-sleep-for
(floats welcome);
Xpdf now supported as a PDF viewer
ess-continued-statement-p
for R and S.
Rgui
on MS Windows to send lines directly from emacs
to Rgui
is available in file lisp/essd-rgui.el
.
Preliminary documentation is in file doc/rgui-doc.txt
.
Changes/New Features in 5.3.6:
Changes/New Features in 5.3.5:
R-mode
which is active by default and can be customized via
ess-r-args-electric-paren
; i.e., use (setq
ess-r-args-electric-paren nil)
to turn it off. Further,
ess-r-args-show-as
allows to switch to the “tooltip” mode.
ess-get-pdf-viewer
and *-ps-viewer; built on new
customizable variables ess-pdf-viewer-pref
and
ess-ps-viewer-pref
; currently used in ess-swv-PDF
and
*-PS
.
ess-swv-PDF
to run pdf viewer only if
pdflatex was ok
ess-swv-weave
to start R automatically if
none is running.
Changes/New Features in 5.3.4:
Changes/New Features in 5.3.3:
ess-display-buffer-reuse-frames
set to true (which changes default behavior) such that execution or
help *frames* are reused.
Changes/New Features in 5.3.2:
(require 'essd-bugs)
with ESS[BUGS]
and JAGS by (require 'essd-jags)
with ESS[JAGS]. But, only one
of them can be used at a time since they don't play nice together. Also,
C-c C-c is now bound to the function ess-bugs-next-action
(F12 has been retired). And finally, note that essl-bug.el
is deprecated and the replacement is essl-bugs.el.
Changes/New Features in 5.3.1:
make install
ess-assign-key
is now C-x =.
RSiteSearch(..)
but with the advantage of
using Emacs' preferred browser, see browse-url-browser-function
Changes/New Features in 5.3.0:
ess-use-inferior-program-name-in-buffer-name
,
which enables using the executable name instead of the dialect name for
R. Feature request.
ess-eval-paragraph-and-step
and
ess-eval-function-or-paragraph-and-step
are bound to keys
C-c C-p and C-c C-c respectively and to the menu in
ESS-mode; also bound in the help mode (for evaluating examples).
ess-toggle-S-assign-key
allows to
assign the “ <- ” insertion to an arbitrary key.
Please send bug reports, suggestions etc. to ESS-bugs@stat.math.ethz.ch
The easiest way to do this is within Emacs by typing
M-x ess-submit-bug-report
This also gives the maintainers valuable information about your installation which may help us to identify or even fix the bug.
If Emacs reports an error, backtraces can help us debug the problem. Type "M-x set-variable RET debug-on-error RET t RET". Then run the command that causes the error and you should see a *Backtrace* buffer containing debug information; send us that buffer.
Note that comments, suggestions, words of praise and large cash donations are also more than welcome.
There is a mailing list for discussions and announcements relating to ESS. Join the list by sending an e-mail with "subscribe ess-help" (or "help") in the body to ess-help-request@stat.math.ethz.ch; contributions to the list may be mailed to ess-help@stat.math.ethz.ch. Rest assured, this is a fairly low-volume mailing list.
The purposes of the mailing list include