This is the README file for the distribution of ESS version 25.01.0
ESS is a GNU Emacs package for interactive statistical programming and data analysis. Languages supported: the S family (S, S-PLUS and R), SAS, BUGS/JAGS and Stata. 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.
ESS supports GNU Emacs versions 25.1 and newer.
ESS is most likely to work with current/recent versions of the following statistical packages: R/S-PLUS, SAS, Stata, OpenBUGS and JAGS.
To build the PDF documentation, you will need a version of TeX Live or texinfo that includes texi2dvi.
There are two main methods used for installing ESS. You may install from a third-party repository or from source code. Once you install it, you must also activate or load ESS in each Emacs session, though installation from a third-party repository likely takes care of that for you. See Activating and Loading ESS for more details.
ESS is packaged by many third party repositories. Many GNU/Linux distributions package it, usually with the name “emacs-ess” or similar.
ESS is also available through Milkypostman’s Emacs Lisp Package Archive (MELPA), a popular repository for Emacs packages. Instructions on how to do so are found on MELPA’s website. MELPA also hosts MELPA-stable with stable ESS builds. You may choose between MELPA with the latest and greatest features (and bugs) or MELPA-stable, which may lag a bit behind but should be more stable.
After installing, users should make sure ESS is activated or loaded in each Emacs session. See Activating and Loading ESS. Depending on install method, this may be taken care of automatically.
Stable versions of ESS are available at the
ESS web page as a .tgz file or .zip
file. ESS releases are GPG-signed, you should check the signature by
downloading the accompanying .sig file and doing:
gpg --verify ess-18.10.tgz.sig
Alternatively, you may download the git repository. ESS is currently
hosted on GitHub: https://github.com/emacs-ess/ESS. git
clone https://github.com/emacs-ess/ESS.git will download it to a new
directory ESS in the current working directory.
We will refer to the location of the ESS source files as /path/to/ESS/ hereafter.
After installing, users should make sure they activate or load ESS in each Emacs session, see Activating and Loading ESS
Optionally, compile Elisp files, build the documentation, and the autoloads:
cd /path/to/ESS/ make
Without this step the documentation, reference card, and autoloads will not be available. Uncompiled ESS will also run slower.
Optionally, you may make ESS available to all users of a machine by
installing it site-wide. To do so, run make install. You might
need administrative privileges:
make install
The files are installed into /usr/share/emacs directory. For this step to
run correctly on macOS, you will need to adjust the PREFIX
path in Makeconf. The necessary code and instructions are
commented in that file.
After installing ESS, you must activate or load it each Emacs session. ESS can be autoloaded, and if you used a third-party repository (such as your Linux distribution or MELPA) to install, you can likely skip this section and proceed directly to Check Installation
Otherwise, you may need to add the path to ESS to load-path with:
(add-to-list 'load-path "/path/to/ESS/lisp")
You then need to decide whether to take advantage of deferred loading
(which will result in a faster Emacs startup time) or require ESS when
Emacs is loaded. To autoload ESS when needed (note that if installed
from source, you must have run make):
(load "ess-autoloads")
To require ESS on startup, you can either put
(require 'ess-site)
or
(require 'ess-r-mode)
In your configuration file, depending on whether you want all ESS features or only R related features.
Restart Emacs and check that ESS was loaded from a correct
location with M-x ess-version.
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.
Changes and New Features in 25.01.0:
etc/proc.sas
and etc/func.sas.
Changes and New Features in 24.01.1:
ess-request-a-process change
Changes and New Features in 24.01.0:
ess-request-a-process obeys ess-gen-proc-buffer-name-function,
thanks to Ihor Radchenko.
Changes and New Features in 19.04 (unreleased):
browser() in
an environment that doesn’t inherit from the search path.
options(width = ) is now set on startup based
on the width of the inferior window.
ess-command now runs R code in a sandboxed environment.
Use .ess.environment() to inspect the current environment.
ess-elisp-trace-mode minor mode.
Toggle it to start or stop tracing all ess-prefixed functions
with trace-function. Tracing is useful for debugging background
ESS behaviour.
ess-get-help-aliases-list now caches the aliases
on the R side. This should speed up help lookup when the search path has
changed and the aliases are read again.
ess-command now uses a default timeout of 30 seconds.
It should normally be avoided with long-running tasks because it causes
Emacs to block while the command is running. If the timeout is reached,
an error is thrown. An interrupt is also sent to the process in case of early
exit.
This is a behaviour change: you will now have to explicitly opt in
blocking the whole Emacs UI for more than 30 seconds by supplying a
larger timeout (use most-positive-fixnum for infinity).
ess-wait-for-process now returns nil if a timeout is
reached.
ess-get-words-from-vector gains a timeout argument.
ess-command is now more robust and resilient to hangs
and custom prompts (#1043). It also strips continuation prompts (+
prompts) automatically and reliably (#1116).
ess-command now handles sinked consoles correctly.
ess-command no longer changes .Last.value.
As a result, background tasks like completions no longer affect
the last value binding (#1058).
display-buffer is set to pop up frames.
inferior-ess-fix-misaligned-output to t.
xref lookup (M-.).
Function locations are now always detected for package libraries listed
in ess-r-package-library-paths.
examples field. Since roxygen is switching to R markdown, it
becomes useful to evaluate chunks of R outside examples.
ess-set-working-directory no longer changes the active
directory (as defined by the buffer-local variable
default-directory) of the buffer where the command is called.
Instead, the active directory of the inferior buffer is updated to the
new working directory.
'nowait.
With this change you should no longer experience freezes while
evaluating code.
C-c C-e C-r. Reloading now reuses the
same process name and start arguments that were used to start the
process.
with-current-buffer with the return value of the inferior.
:: and ::: operators.
goto-address-mode for url and email highlighting in inferior buffers.
smart-underscore and ess-smart-S-assign-key have been removed.
Users who liked the previous behavior (i.e. underscore inserting “<-”)
should bind ess-insert-assign to the underscore in their Emacs
initialization file. For example, (define-key ess-r-mode-map "_"
#'ess-insert-assign) and (define-key inferior-ess-r-mode-map "_"
#'ess-insert-assign) will activate it in all ESS R buffers.
ess-auto-width-visible controls
visibility.
display-buffer-alist.
Users can now use display-buffer-alist to manage how and where
windows appear. For more information and examples, see See (ess)Controlling
buffer display.
ess-roxy-mode can now be enabled in non-R buffers.
This is primarily intended to support roxygen documentation for cpp
buffers. Preview functionality is not supported outside R buffers.
conf-colon-mode.
ess-style now has effects when set as a file or directory local variable.
ess-default-style is now obsolete, use ess-style instead.
eldoc-echo-area-use-multiline-p
ess-r-rhub-check-package gained new RECOMMENDED.
ess-save-silently.
options(help_type = ``html'') but works with the plain-text
version as well. This only works with options(useFancyQuotes =
TRUE) (the default).
ess-rdired buffers now derive from tabulated-list-mode.
They should look better and be a bit faster overall. The size column
now displays object sizes in bytes.
ess-rdired buffers now auto-update.
The frequency is governed by the new option
ess-rdired-auto-update-interval.
electric-layout-mode is now supported.
This automatically inserts a newline after an opening curly brace in R
buffers. To enable it, customize ess-r-mode-hook.
The following have been made obsolete or removed, see their documentation for more detail:
ess-noweb, ess-swv, and related
functionality like Rnw-mode. Users are encouraged to switch to
one of several other packages that deal with these modes. For example,
polymode https://github.com/polymode/poly-R/,
https://polymode.github.io/, or markdown-mode with edit-indirect
https://jblevins.org/projects/markdown-mode.
auto-complete is obsolete.
The auto-complete package is unmaintained and so ESS support is
now obsolete. Users are encouraged to switch to company-mode
instead.
ess-show-buffer-action,
inferior-ess-same-window, inferior-ess-own-frame, and
inferior-ess-frame-alist. See above about ESS respecting
display-buffer-alist.
ess-tab-always-indent and ess-tab-complete-in-script.
Use the Emacs-wide setting of tab-always-indent instead.
inferior-ess-*-start-file variables.
All modes except Stata did not respect customization of this variable.
In order to load a file on startup, you should put a function on
ess-*-post-run-hook.
Bug Fixes in 18.10.3:
Bug Fixes in 18.10.2:
make install and including
full docs in the tarballs.
Bug Fixes in 18.10.1:
ess-eval-line-visibly-and-step (C-c C-n and ess-eval-region-or-line-visibly-and-step (C-RET)
which behave as the old versions of ess-eval-line-and-step and ess-eval-region-or-line-and-step.
Changes and New Features in 18.10:
package-install does), you should not need to (require
'ess-site) at all, as autoloads should automatically load ESS when it
is needed (e.g. the first time an R buffer is opened). In order to defer
loading your ESS config, you may want to do something like
(with-require-after-load "ess" <ess-config-here>) in your Emacs
init file. Users of the popular use-package Emacs package can now
do (use-package ess :defer t) to take advantage of this behavior.
For more information on this feature, see See (ess)Activating and Loading
ESS.
C-c [letter] bindings have been
removed. This affects C-c h, which was bound to
ess-eval-line-and-step-invisibly in sas-mode-local-map;
C-c f, which was bound to ess-insert-function-outline in
ess-add-MM-keys; and C-c h, which was bound to
ess-handy-commands in Rd-mode-map,
ess-noweb-minor-mode-map, and ess-help-mode-map
ess-eval-line-and-step and ess-eval-region-or-line-and-step
now behave consistently with other evaluation function inside a package.
ess-r-package-use-dir now works with any mode.
This sets the working directory to the root of the current package
including for example C or C++ files within /src).
strip for inferior-ess-replace-long+.
This strips the entire + + sequence.
prog-mode.
In the next release, ESS modes will use define-derived-mode so
that each mode will have (for example) its own hooks and keymaps.
lintr package to use it. Customizable
options include ess-use-flymake, ess-r-flymake-linters,
and ess-r-flymake-lintr-cache.
setwd().
Makevars files open with makefile-mode.
ess-write-to-dribble.
This allows users to disable the dribble (*ESS*) buffer if they wish.
*-program-name variables have been renamed to *-program.
Users who previously customized e.g. inferior-ess-R-program-name
will need to update their customization to
inferior-ess-R-program. These variables are treated as risky
variables.
ess-smart-S-assign was renamed to ess-insert-assign.
It provides similar functionality but for any keybinding, not just ‘_‘.
For instance if you bind it to ‘;‘, repeated invocations cycle through
between assignment and inserting ‘;‘.
C-c C-= is now bound to ess-cycle-assign by default.
See the documentation for details. New user customization option
ess-assign-list controls which assignment operators are cycled.
ess-eval-region for details. This only
works on Emacs 25.1 and newer.
Many improvements to fontification:
ess-R-keywords and ess-R-modifiers.
See the documentation for details.
in is now only fontified when inside a for construct.
This avoids spurious fontification, especially in the output buffer
where ‘in‘ is a common English word.
ess-R-keywords in your Emacs configuration file after loading
ESS (i.e. in the :config section for use-package users).
@param keywords now supports comma-separated parameters.
if () or
stop() are no longer fontified as keyword if not followed by an
opening parenthesis. The same holds for search path modifiers like
library() or require().
%op% operators
and backquoted function definitions.
ess-font-lock-toggle-keyword can be called interactively.
This command asks with completion for a font-lock group to toggle.
This functionality is equivalent to the font-lock menu.
Notable bug fixes:
prettify-symbols-mode no longer breaks indentation.
This is accomplished by having the pretty symbols occupy the same
number of characters as their non-pretty cousins. You may customize
the new variable ess-r-prettify-symbols to control this
behavior.
Obsolete libraries, functions, and variables:
ess-r-args.el library has been obsoleted and will be removed in the next release.
Use eldoc-mode instead, which is on by default.
ess-smart-S-assign,
ess-toggle-S-assign, ess-toggle-S-assign-key,
ess-disable-smart-S-assign.
The variable ess-smart-S-assign-key is now deprecated and will
be removed in the next release. If you would like to continue using
‘_‘ for inserting assign in future releases, please bind
ess-insert-assign in ess-mode-map the normal way.
ess-s-versions-list is obsolete and ignored.
Use ess-s-versions instead. You may pass arguments by starting
the inferior process with the universal argument.
Changes and New Features in 17.11:
(require 'ess-r-mode) or (require 'ess-stata-mode) in your
init file. This is for experienced Emacs users as this requires setting
up autoloads for .R files manually. We will keep maintaining
ess-site for easy loading of all ESS features.
ess-r-package-use-dir. It sets the
working directory of the current process to the current package directory.
ess-r-package-source-roots contains
package sub-directories which are searched recursively during the file
lookup point. Directories in ess-tracebug-search-path are now
also searched recursively.
R/ directory. This way ESS will not attempt to update
function definitions from a package if you are working from e.g. a test
file.
Changes and New Features in 16.10:
%op% operators are
recognized as sexp. This is useful for code navigation, e.g. with
C-M-f and C-M-b.
ess-roxy-fold-examples to non-nil to
automatically fold the examples field when you open a buffer.
ess-roxy-fontify-examples to non-nil to try it out.
ess-r-devtools-ask
bound to C-c C-w C-a. It asks with completion for any devtools
command that takes pkg as argument.
inferior-ess-r-reload-hook
on reloading.
ess-r-package-mode is now activated in non-file buffers as well.
Bug fixes in 16.10:
...= inside list( ).
ess-remote
Changes and New Features in 16.04:
developer functionality has been refactored.
The new user interface consists of a single command
ess-r-set-evaluation-env bound by default to C-c C-t
C-s. Once an evaluation environment has been set with, all subsequent
ESS evaluation will source the code into that environment. By default,
for file within R packages the evaluation environment is set to the
package environment. Set ess-r-package-auto-set-evaluation-env to
nil to disable this.
ess-r-package-mode
This development mode provides features to make package development
easier. Currently, most of the commands are based on the devtools
packages and are accessible with C-c C-w prefix. See the
documentation of ess-r-package-mode function for all available
commands. With C-u prefix each command asks for extra arguments to
the underlying devtools function. This mode is automatically enabled in
all files within R packages and is indicated with [pkg:NAME] in
the mode-line.
options('html_type').
Bug fixes in 16.04:
debug_pipe
Please post bug reports, suggestions etc. on our github issue tracker; if not possible, e-mail them to ESS-help@r-project.org.
The easiest way to set this up, 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@r-project.org; contributions to the list may be mailed to ess-help@r-project.org. Rest assured, this is a fairly low-volume mailing list.
The purposes of the mailing list include