[ESS] Installing ESS under Windows XP
Marcel Dettling
dettling at jhu.edu
Thu Nov 11 23:59:56 CET 2004
Dear readers,
I just installed ess-5.2.3 under Emacs in Windows XP. I was happy to follow
a so-called "idiot proof" installation instruction, circulated in April 2004
on this mailing list by Paul Johnson. Despite his tutorial was fairly
comprehensive, I ran into some problems (truly minor issues, but it took me
anyway a while to sort things out). I updated these instruction and attach
them here below.
In my opinion, it would be very helpful to distribute these instruction via
the ESS website and the README files. The XEmacs installation instructions
which are given there don't apply directly for Emacs.
Best regards,
Marcel
-------------------------------------
Running R withing Emacs under Windows
-------------------------------------
Marcel Dettling (dettling at jhu.edu), 11/11/2004, based on a tutorial by
Paul Johnson (pauljohn at ku.edu).
1. Installing Emacs
-------------------
In case you want to install Emacs on a personal computer, here's what
you do. This is not the most elegant strategy, but it does work on
both the Windows 2000 and Windows XP systems.
Get the latest version of Emacs, i.e. the file:
emacs-21.3-fullbin-i386.tar.gz
I found copies on many of the ftp mirrors, including:
http://ftp.gnu.org/gnu/windows/emacs/
and store it in the directory where your programs are. Often (and on
my computer, this is
c:\ProgramFiles
open the tarball (using winzip or any other tar-equipt compression
program you want), you dump the emacs-21.3-fullbin-i386.tar.gz it into
c:\ProgramFiles.
It creates a directory so you see
c:\ProgramFiles\emacs-21.3.
Look inside there for subdirectories
bin : "binary", meaning programs. There you see "runemacs.exe" which
is the thing you would double click on. You can create desktop
shortcuts in the usual way if you want.
lisp: a collection of files in lisp format that supply addon
capability
site-lisp: an empty place where you can install things like ESS
In the Windows Explorer, go into the bin directory, double click the
"addpm" program. That makes a little registry change in your
system. It adds an Emacs start menu iterm. You can always go move the
icon for emacs into the Editor group and delete the GNU Emacs
group. As you like, you don't have to.
2. Installing ESS
-----------------
Now, go get the latest version of ESS. I would install this one:
ess-5.2.3.tar.gz
It is available from
http://ess.r-project.org/downloads/ess/
Untar it into Emacs site-lisp directory, this is
c:\ProgramFiles\emacs-21.3\site-lisp
It will create its own directory, so it should be
C:\ProgramFiles\emacs-21.3\site-lisp\ess-5.2.3
Then create a file called "site-start.el" and in the site-lisp
directory. You need only one line:
(load "c:/ProgramFiles/emacs-21.3/site-lisp/ess-5.2.3/lisp/ess-site.el")
(that's all on one line). Note, if you change directories names or
such, then you have to fix that and use a different path. Store that
file in c:\ProgramFiles\emacs-21.3\site-lisp.
Should there already be a file called "site-start.el" you may simply
add the statement
(load "c:/ProgramFiles/emacs-21.3/site-lisp/ess-5.2.3/lisp/ess-site.el")
at the bottom of the existing file. However, there is one situation
where this will not help. If there is a compiled file "site-start.elc"
in your site-lisp directory, you have to byte compile your edited
"site-start.el". To do this, open the file in Emacs, and click on
Byte-compile This File
in the Emacs-Lisp menu.
That should get the job done.
3. Running R within Emacs
-------------------------
If your R is working and if the R/bin directory is in your path, then
Emacs will be able to find it. So open a file with the extension R,
and you should be able to observe the syntax highlighting. Then type
M-x R
(M is for "meta", which is most likely ALT key on your
system. Alternatively, it could be the ESC key.)
If R does not start inside Emacs, then it means your R is installed
incorrectly/incompletely. Most likely, you need to add the directory
that holds the file Rterm.exe into your search PATH. In Windows 2000
or XP, that's a setting you can change in the
Control Panel/System/Advanced
menu. Click on Environment Variables and edit the variable 'Path' in
your system variables. There you need to add
C:/ProgramFiles/R/rw2000/bin
at the end of the line. Exit by clicking the ok button several
times. Note that this path depends on the place where you installed
your R, your directory names and the R version. You may have to fix
the above line according to your needs.
--------------------------------------
Marcel Dettling
Postdoctoral Fellow
Johns Hopkins University
Phone: 410-614-4770
E-Mail: dettling at jhu.edu
Web: http://stat.ethz.ch/~dettling
More information about the ESS-help
mailing list