Home | Contact Me
         
       
Study | Resources | Facts of Life
How to install ESS and XEmacs on Windows

Click screen shot icon to see what it looks like.

If some screen shots look not clear to you, try to enlarge the size of it by clicking if your operating system is WindowXP.

Install R for Windows.
(I uses R version 1.8.1, and use R GUI for Windows). R GUI screen shot
Know directory structure of your R program.
(I have installed R under a directory called "c:\QingR", which I will later refer as R's root directory). R dir screen shot

Install XEmacs for Windows.
(I uses XEmacs version 21.4.13). XEmacs GUI screen shot
Know directory structure of your XEmacs program.
(I have installed XEmacs under a directory called "c:\unixsys\XEmacs\XEmacs-21.4.13", which I will later refer as XEmacs' root directory). XEmacs dir screen shot
Know working directory (".xemacs") of your XEmacs program.
The working directory ".xemacs" is at the same level as your "My Documents" directory. In another word, it is under the same directory as "My Documents". Or you can just search for directory ".xemacs".
(On my machine, it's path is "c:\Documents and Settings\Administrator\.xemacs") XEmacs working dir screen shot

Put ESS files on your computer.
Download ESS .zip file or tar.gz file.
Uncompress ESS .zip file or tar.gz file extract all files under a directory you specified.
(I unziped ESS version 5.2.0, under "c:\unixsys\ess-5.2.0", which I will later refer as ESS' root directory). ESS dir screen shot

You can either use application such as WinZip, WinRar, or archive functions such as unzip or tar commands which usually come with Unix shell program.

Configure ESS for it to find R executable file Rterm.exe
Find a file called "ess-site.el" under path: ESS' root directory\lisp (On my machine, its whole path with name is: "c:\unixsys\ess-5.2.0\lisp\ess-site.el"). ESS dir screen shot
Search for two lines of code:
;;(setq-default inferior-R-program-name "Rterm") ; msdos systems
;;(setq-default inferior-R-program-name "c:\\Program Files\\R\rw1081\\bin\\Rterm.exe") ; msdos systems
Uncomment those two lines, i.e., removing ";;" from the beginning of the line will reinstate the line as a LISP command.
Change "C:\\Program Files\\R\\rw1081\\bin\\Rterm.exe" to specific path of Rterm.exe on your computer. It is "R's root directory\\bin\\Rterm.exe".
(For my machine, this line of command should be (setq-default inferior-R-program-name "c:\\QingR\\bin\\Rterm.exe")
CAUTION: It is not a typo, you need two back slash like this "\\" for the program to understand the path information.

File "ess-site.el" contains some commands written in LISP, a programming language XEmacs understands. This file is used to configure the ESS to find necessary executables files and set initial value for ESS. Instead of using Rgui.exe, ESS uses Rterm.exe to start a session/process of R. Those two lines in configuration file is related to R. The text in brackets () is LISP command. But ";" means all code after it to the end of the line is a comment.

Configure XEmacs to load ESS at the beginning of its program
Find a file called "init.el" under the path: XEmacs working directory. If it is not there, create one.
(On my machine, its full path is: "c:\Documents and Settings\Administrator\.xemacs\init.el"). Emacs dir screen shot
There should be only one line of text in "site-start.el":
(load "ESS' root directory/lisp/ess-site.el")
On my machine, the line should read as:
(load "c:/unixsys/ess-5.2.0/lisp/ess-site.el")
CAUTION: It is not a typo, this time it is forward slash "/" for the program to understand the path information.

This file contains some commands written in LISP, a programming language XEmacs understands. This file is used to configure the Emacs to load configuration file of ESS, i.e, "ess-site.el".

Start the XEmacs, you should be able to see the "init.el" has loaded the "ess.site.el" successfully. R on Emacs screen shot
Use key combination command: M-x R to start a R process. R on Emacs screen shot
CAUTION: When you do the key combination M-x R, make sure you type captial letter "R". If you type lower case "r", it would not start R, but ask you to type more specific command.

     
Qing Li
Biostatistics Dept. Bloomberg School of Public Health
Baltimore, MD 21205
qli@jhsph.edu

JHU Lib | JHSPH | Biostatistics Dept
SLAM | Karl Broman Website | Faculty | R Base Doc
Study | Resources | Facts of Life | Home
Page Last Updated: Feb. 2006   © 2003 Qing Li   All Rights Reserved.