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


Installing ESS on your system

The following section details those steps necessary to get ESS running on your system.

Other variables you may need to change

If you run the S program (from the shell) with a command other than `Splus' you will need to set the variable inferior-ess-program to the name of the appropriate program by including a line such as

(setq inferior-ess-program "S+")

in your `.emacs' file (substituting `S+' for the name of your S program.)

If you need to call this program with any arguments, the variable you need to set is dependent on the value of inferior-ess-program; for example if it is "Splus", set the variable inferior-Splus-args to a string of arguments to the Splus program. If inferior-ess-program has some other value, substitute the Splus part of inferior-Splus-args with the appropriate program name. There aren't many instances where you need to call S with arguments, however: in particular do not call the S program with the `-e' command-line editor argument since ESS provides this feature for you.

If you are running Splus (the enhanced version of S from Statsci) you may also need to set the variable S-plus to t. If your value of inferior-ess-program is "S+" or Splus this will not be necessary, however; S-plus defaults to t in this case.

Finally, if you use a non-standard prompt within S, you will need to set the variable inferior-ess-prompt to a regular expression which will match both the primary prompt ("> " by default) and the continuing prompt (default of "+ ".) The default value of this variable matches S's default prompts. For example, if you use ("$ ") as your primary prompt (you have options(prompt="$ ") in your .First function), add the following line to your `.emacs':

(setq inferior-ess-prompt "^\\(\\+\\|[^\\$]*\\$\\) *")

You will also need to set the variable inferior-ess-primary-prompt to a regular expression which matches the primary prompt only. Do not anchor the regexp to the beginning of the line with `^'. Once again, the default value matches S's default prompt; in the example above the appropriate value would be "[^\\$]*\\$ *".

Once these variables are set appropriately, ESS should work on any system.


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