User manual
Chapter 4: Interacting with the ESS process 32
4.6 Is the Statistical Process running under ESS?
For the S languages (S, S-Plus, R) ESS sets an option in the current process that programs
in the language can check to determine the environment in which they are currently running.
ESS sets options(STERM="iESS") for S language processes running in an inferior
iESS[S] or iESS[R] buffer.
ESS sets options(STERM="ddeESS") for independent S-Plus for Windows processes run-
ning in the GUI and communicating with ESS via the DDE (Microsoft Dynamic Data
Exchange) protocol through a ddeESS[S] buffer.
Other values of options()$STERM that we recommend are:
• length: Fixed length xterm or telnet window.
• scrollable: Unlimited length xterm or telnet window.
• server: S-Plus Stat Server.
• BATCH: BATCH.
• Rgui: R GUI.
• Commands: S-Plus GUI without DDE interface to ESS.
Additional values may be recommended in the future as new interaction protocols are
created. Unlike the values iESS and ddeESS, ESS can’t set these other values since the S
language program is not under the control of ESS.
4.7 Using emacsclient
When starting R or S under Unix, ESS sets options(editor="emacsclient"). (Under
Microsoft Windows, it will use gnuclient.exe rather than emacsclient, but the same principle
applies.) Within your R session, for example, if you have a function called iterator, typing
fix(iterator), will show that function in a temporary Emacs buffer. You can then correct
the function. When you kill the buffer, the definition of the function is updated. Using
edit() rather than fix() means that the function is not updated. Finally, the S function
page(x) will also show a text representation of the object x in a temporary Emacs buffer.
4.8 Other commands provided by inferior-ESS
The following commands are also available in the process buffer:
[Command]comint-interrupt-subjob
C-c C-c Sends a Control-C signal to the ESS process. This has the effect of aborting
the current command.
[Command]ess-switch-to-inferior-or-script-buffer toggle-eob
C-c C-z When in process buffer, return to the most recent script buffer. When in a
script buffer pop to the associated process buffer. This is a single key command, that
is C-c C-z C-z from a script buffer returns to the original buffer.
If toggle-eob is given, the value of ess-switch-to-end-of-proc-buffer is toggled.
[User Option]ess-switch-to-end-of-proc-buffer
If non-nil, ess-switch-to-inferior-or-script-buffer goes to end of process
buffer.










