[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As well as using ESS to edit your source files for statistical programs, you can use ESS to run these statistical programs. In this chapter, we mostly will refer by example to running S from within emacs. The emacs convention is to name such proceses running under its control as `inferior processes'. This term can be slightly misleading, in which case these processes can be thought of `interactive processes'. Either way, we use the term `iESS' to refer to the Emacs mode used to interact with statistical programs.
3.1 Starting an ESS process | ||
3.2 Running more than one ESS process | ||
3.3 ESS processes on Remote Computers | ||
3.4 S+elsewhere and ESS-elsewhere | ||
3.5 Changing the startup actions |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To start an S session, simply type M-x S RET.
S will then (by default) ask the question
S starting data directory? |
cd
'd to before starting S from
the shell). This directory should have a `.Data' subdirectory.
You will then be popped into a buffer with name `*S*' which will be used for interacting with the ESS process, and you can start entering commands.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
ESS allows you to run more than one ESS process simultaneously in the same session. Each process has a name and a number; the initial process (process 1) is simply named (using S-PLUS as an example) `S+3:1'. The name of the process is shown in the mode line in square brackets (for example, `[S+3:2]'); this is useful if the process buffer is renamed. Without a prefix argument, M-x S starts a new ESS process, using the first available process number. With a prefix argument (for R), C-u M-x R allows for the specification of command line options.
You can switch to any active ESS process with the command `M-x ess-request-a-process'. Just enter the name of the process you require; completion is provided over the names of all running S processes. This is a good command to consider binding to a global key.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
ESS works with processes on remote computers as easily as with processes on the local machine. The recommended way to access a statistical program on remote computer is to start it from a telnet or ssh buffer and then connect ESS to that buffer.
Should you or a colleague inadvertently start a statistical process in an ordinary `*shell*' buffer, the `ess-remote' command can be used to convert it to an ESS buffer and allow you to use the ESS commands with it.
We have two older commands, now deprecated, for accessing ESS processes on remote computers. See section 3.4 S+elsewhere and ESS-elsewhere.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These commands are now deprecated. We recommend `ess-remote'. We have two versions of the elsewhere function. `S+elsewhere' is specific for the S-Plus program. The more general function `ESS-elsewhere' is not as stable.
Or enter `M-x ESS-elsewhere'. You will be prompted for an ESS program and for a starting directory. I usually give it my project directory on the local machine, say `~myname/myproject/'
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you do not wish ESS to prompt for a starting directory when starting
a new process, set the variable ess-ask-for-ess-directory
to
nil
. In this case, the value of the variable ess-directory
is used as the starting directory. The default value for this variable
is your home directory. If ess-ask-for-ess-directory
has a
non-nil
value (as it does by default) then the value of
ess-directory
provides the default when prompting for the
starting directory. Incidentally, ess-directory
is an ideal
variable to set in ess-pre-run-hook
.
If you like to keep a record of your S sessions, set the variable
ess-ask-about-transfile
to t
, and you will be asked for a
filename for the transcript before the ESS process starts.
nil
, as for a file name in which to save the session
transcript.
Enter the name of a file in which to save the transcript at the prompt. If the file doesn't exist it will be created (and you should give it a file name ending in `.St'); if the file already exists the transcript will be appended to the file. (Note: if you don't set this variable but you still want to save the transcript, you can still do it later -- see section 4.4.4 Keeping a record of your S session.)
Once these questions are answered (if they are asked at all) the S
process itself is started by calling the program name specified in the
variable inferior-ess-program
.
If you need to pass any arguments to this program, they may be specified
in the variable inferior-S_program_name-args
(e.g. if
inferior-ess-program
is "S+"
then the variable to set is
inferior-S+-args
.
It is not normally necessary to pass arguments to the S program; in
particular do not pass the `-e' option to Splus
, since ESS
provides its own command history mechanism.
By default, the new process will be displayed in another window in the
current frame. If you wish your S process to appear in a separate
variable, customize the variable inferior-ess-own-frame
.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |