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


Starting the ESS process

To start an S session, simply type M-x S RET, i.e. press ESC, then x, then capital S and then the RETURN key.

S will then (by default) ask the question

S starting data directory?

Enter the name of the directory you wish to start S from (that is, the directory you would have 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.

Running more than one ESS process

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 for the size of memory allocated to the R process, for example.

You can switch to any active ESS process with the command C-c C-k (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.

For the predecessor to ESS (S-mode 4.8), the initial process was not visibly numbered, i.e. S instead of S1 was used in the mode-line. To obtain this behavior, set the variable ess-plain-first-buffername to t. See `ess-site' for how to set this for all users.

Changing the startup actions

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 records 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.

User Option: ess-ask-about-transfile
If non-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 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.


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