[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following section details those steps necessary to get ESS running on your system.
A.1 Unix installation | Installing ESS on your Unix system | |
A.2 Microsoft Windows installation | Installing ESS on your MS Windows system | |
A.3 Requirements | emacs, Operating Systems and Statistical Packages | |
A.4 Variables you may need to change |
We now discuss installation, which might happen under Unix or Microsoft Windows. First, we discuss Unix installation. See section Unix installation.
For Microsoft Windows Installation please skip to the See section Microsoft Windows installation.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
cd to a directory where you want to install ESS, creating it if necessary. This directory will be referred to below as ESSDIR.
Retrieve the latest version from gzipped tar file to ESSDIR.
Decompress/unarchive the files from the disribution.
gunzip ess-VERSION.tar.gz tar xvf ess-VERSION.tar |
(or: |
The tar
command will create the subdirectory ess-VERSION and unarchive
the files there.
If you are using GNU Emacs 19.29, decompress/unarchive `ESSDIR/ess-VERSION/lisp/19.29.tar.gz', read `ESSDIR/ess-VERSION/lisp/19.29/README', follow the instructions and you might be able to get ESS to work. Please note that GNU Emacs 19.29 is no longer supported. For a list of supported versions of emacs, see See section Requirements.
Edit the file `ESSDIR/ess-VERSION/lisp/ess-site.el' as explained in the comments section of that file.
Add the line
(load "ESSDIR/ess-VERSION/lisp/ess-site") |
to your user or system installation file (GNU Emacs uses `$HOME/.emacs' and XEmacs uses `$HOME/.xemacs/init.el' for the user initialization file. GNU Emacs uses default.el or site-init.el and XEmacs uses site-start.el for the system installation file).
Alternatively, if ess-site.el is in your current Lisp path, you can do:
(require 'ess-site) |
to configure emacs for ESS.
That's it! To edit statistical programs, load the files with the requiste extensions (".sas" for SAS, ".S" for S-PLUS, ".R" for R, and ".lsp" for XLispStat).
(OPTIONAL) If you are running S-PLUS or R, you might consider
installing the database files. From within emacs, C-x d
to the
directory containing ESS. Now:
M-x S+6 |
to get S running. Once you see the SPLUS prompt, do:
M-x ess-create-object-name-db |
(this will create the file `ess-s+6-namedb.el'; if it isn't in the ESS directory, move it there).
Then, completions will be autoloaded and will not be regenerated for every session.
For R, do the same, using
M-x R |
and then M-x ess-create-object-name-db
creating
`ess-r-namedb.el'; if it isn't in the ESS directory, move it there).
(OPTIONAL) READ THIS ITEM THOROUGHLY BEFORE STARTING:
If you want to place the compiled files in other locations edit the LISPDIR and INFODIR entries in `Makeconf' in the ESSDIR/ess-VERSION directory (if you are using XEmacs, then you also need to edit the EMACS entry as follows: EMACS=xemacs).
You can compile those files by:
make all |
When that completes successfully, install the compiled files:
make install |
This will install the compiled info files and lisp files. If you are an
XEmacs user, then you should be done. If not, then you may have to
edit/create the file `dir' that is found in the directory specified
by INFODIR
: see the sample `dir' in ESSDIR/ess-VERSION/doc/info.
If `dir' does not exist in INFODIR
, then the sample
`dir' will be installed.
Note 1: It is assumed that GNU make will be used; otherwise, edit the ESSVERSION and ESSVERSIONTAG entries in `Makeconf' appropriately, e.g.: ESSVERSION=5.2.0 and ESSVERSIONTAG=ESS-5-2-0
Note 2: ESS can be installed for XEmacs as an XEmacs package much more easily than what has been described anywhere above. However, the latest ESS version will not be available at the same time as an XEmacs package; generally, it can take weeks or months to appear in the latter format. For more information on installing ESS as an XEmacs package see Quickstart Package Guide.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For Microsoft Windows installation, please follow the next steps: (see separate instructions above for UNIX See section Unix installation.
cd to a directory where you keep emacs lisp files, or create a new directory (for example, `c:\emacs\') to hold the distribution. This directory will be referred to below as "the ESS distribution directory". It will contain, at the end, either the tar file `ess-VERSION.tar.gz' or the zip file `ess-VERSION.zip', and a directory for the ESS source, which will be termed "the ESS-VERSION source directory".
Retrieve the compressed tar file `ess-VERSION.tar.gz' or the zipped file `ess-VERSION.zip' from one of the FTP or WWW archive sites via FTP (or HTTP). Be aware that http browsers on Windows frequently change the "." and "-" characters in filenames to other punctuation. Please change the names back to their original form.
Copy `ess-VERSION.tar.gz' to the location where you want the ess-VERSION directory, for example to `c:\emacs\ess-VERSION.tar.gz', and cd there. For example,
cd c:\emacs |
Extract the files from the distribution, which will unpack into a subdirectory, `ess-VERSION'.
gunzip ess-VERSION.tar.gz tar xvf ess-VERSION.tar (or: |
The tar
command will extract files into the current directory.
Do not create `ess-VERSION' yourself, or you will get an extra level of depth to your directory structure.
Windows users will usually be able to use the `lisp/ess-site.el' as distributed. Only rarely will changes be needed.
Windows users will need to make sure that the directories for the software they will be using is in the PATH environment variable. On Windows 9x, add lines similar to the following to your `c:\autoexec.bat' file:
path=%PATH%;c:\progra~1\spls2000\cmd |
On Windows NT/2000/XP, add the directories to the PATH using the
My Computer/Control Panel/System/Advanced/Environment Variables
menu.
Note that the directory containing the program is
added to the PATH, not the program itself. One such line is needed
for each software program. Be sure to use the abbreviation
progra~1
and not the long version with embedded blanks. Use
backslashes "\".
Add the line
(load "/PATH/ess-site") |
to your .emacs (or _emacs) file (or default.el or site-init.el, for
a site-wide installation). Replace /PATH
above with the
value of ess-lisp-directory as defined in `ess-site.el'. Use
forwardslashes /
.
(GNU Emacs uses the filename `%HOME%/.emacs' and
XEmacs uses the filename `%HOME%/.xemacs/init.el'
for the initialization file.)
To edit statistical programs, load the files with the requisite extensions (".sas" for SAS, ".S" or "s" or "q" or "Q" for S-PLUS, ".r" or ".R" for R, and ".lsp" for XLispStat).
To run statistical processes under emacs:
To start the S-PLUS 6.x GUI from ESS under emacs:
M-x S
(or |
You will then be
asked for a pathname ("S starting data directory?"), from which to
start the process. The prompt will propose your current directory
as the default. ESS will start the S-PLUS GUI. There will be
slight delay during which emacs is temporarily frozen. ESS will arrange for
communication with the S-PLUS GUI using the DDE protocol.
Send lines or regions
from the emacs buffer containing your S program (for example,
`myfile.s') to the S-PLUS Commands Window with the
C-c C-n
or C-c C-r
keys.
(If you are still using S-PLUS 4.x or 2000, then use M-x S+4
.)
To start an S-PLUS 6.x session inside an emacs buffer--and without the S-PLUS GUI:
M-x Sqpe
(or |
You will then be asked for a pathname ("S starting data
directory?"), from which to start the process. The prompt will
propose your current directory as the default.
You get Unix-like behavior, in particular the entire
transcript is available for emacs-style search commands.
Send lines or regions from the emacs buffer containing your S
program (for example, `myfile.s') to the *S+6* buffer with the
C-c C-n
or C-c C-r
keys.
Interactive graphics are available with Sqpe by using the java
library supplied with S-PLUS 6.1 and newer releases.
Enter the commands:
library(winjava) java.graph() |
Graphs can be saved from the java.graph
device
in several formats, but not PostScript. If you
need a PostScript file you will need to open a separate
postscript
device.
(If you are still using S-PLUS 4.x or 2000, then use M-x Sqpe+4
.)
To connect to an already running S-PLUS GUI (started, for example, from the S-PLUS icon):
M-x S+6-existing |
You will then be
asked for a pathname ("S starting data directory?"), from which to
start the process. The prompt will propose your current directory
as the default. ESS will arrange for
communication with the already running S-PLUS GUI using the DDE protocol.
Send lines or regions
from the emacs buffer containing your S program (for example,
`myfile.s') to the S-PLUS Commands Window with the
C-c C-n
or C-c C-r
keys.
(If you are still using S-PLUS 4.x or 2000, then use M-x S+4-existing
.)
If you wish to run R, you can start it with:
M-x R |
XLispStat can not currently be run with
M-x XLS |
Hopefully, this will change. However, you can still edit with emacs, and cut and paste the results into the XLispStat *Listener* Window under Microsoft Windows.
SAS for Windows uses the batch access with function keys that is
described in See section ESS[SAS]-MS Windows.
The user can also edit SAS files
in an ESS[SAS]
buffer and than manually copy and paste them into
an Editor window in the SAS Display Manager.
For Windows, inferior SAS in an iESS[SAS]
buffer does not work
on the local machine. It does work over a network connection to
SAS running on a remote Unix computer.
Reason: we use ddeclient to interface with programs and SAS doesn't provide the corresponding ddeserver capability.
(OPTIONAL) If you are running Sqpe or R, you might consider
installing the database files. From within emacs, C-x d
to
the directory containing ESS. Now:
M-x Sqpe+6 |
to get S running. Once you see the SPLUS prompt, do:
M-x ess-create-object-name-db |
(this will create the file `ess-s+6-namedb.el'; if it isn't in the ESS directory, move it there).
Then, completions will be autoloaded and will not be regenerated for every session.
For R, do the same, using
M-x R |
and then M-x ess-create-object-name-db
creating
`ess-r-namedb.el'; if it isn't in the ESS directory, move it
there).
That's it!
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
ESS has been tested with
S-PLUS 3.3, 3.4, 4.5, 2000, 5.0, 5.1, 6.0, 6.1, 6.2
R >=0.49
S4
SAS >=6.12
BUGS 0.5, 0.603
Stata >=6.0
XLispStat >=3.50
on the following platforms
Linux (all)
Solaris/SunOS (all)
Microsoft Windows 95/98/NT/2000/XP (SPLUS 4.5/2000/6.*, R, SAS and BUGS)
Apple Mac OS (SAS for OS 9 and X11 R for OS X)
with the following versions of emacs
GNU Emacs 20.3, 20.4, 20.5, 20.6, 20.7, 21.1, 21.3
XEmacs 21.0, 21.1.13-14, 21.4.0-8, 21.4.9-13/21.5.17(1), 21.4.14-15
GNU Emacs <20.3 and XEmacs <21.0(2)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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+") |
(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.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Rodney Sparapani on June, 30 2004 using texi2html 1.70.