[ESS] ess installation on Windows [forwarded]

Frede Aakmann Tøgersen FredeA.Togersen at agrsci.dk
Fri Aug 12 09:44:47 CEST 2005


First of all: thanks to the developers of ESS (S-mode).

See below for answers to some of Zachary's questions.

Regards Frede



----------------------------------------------------
Frede Aakmann Tøgersen
Department of Genetics og Biotechnologi
Danish Institute of Agricultural Sciences
Postboks 50, Research Centre Foulum
DK-8830 Tjele, Denmark
--------------------------------------------------------

 

> -----Oprindelig meddelelse-----
> Fra: ess-help-bounces at stat.math.ethz.ch 
> [mailto:ess-help-bounces at stat.math.ethz.ch] På vegne af 
> Zachary Skrivanek
> Sendt: 11. august 2005 10:48
> Til: Zachary Skrivanek; Paul Johnson; ESS-help at stat.math.ethz.ch
> Emne: Re: [ESS] ess installation on Windows [forwarded]
> 
> Paul,
>  
> Hi!  I edited the PATH per instructions from another website 
> and when I tried to launch Splus used 'M-x Sqpe' (instead of 
> 'M-x S', for which I still get the same error message as I 
> shared with you before) I get a much more promising message.  
> It looked like it was going to launch Splus; it asked for a 
> starting data directory.  (See attached.)  But when I hit 
> 'enter' I got the message "Spawning child process:  invalid 
> argument".  Do you know what this means and how to get around it?
>  

This means probably that despite you think you have set the enviroment variable PATH to point to your Splus directory the inferior ESS process is not able to locate sqpe.exe.

Did you use the System dialog window found under the Control Panel to change the path. To do that click the Advanced panel -> Environment variables, where you can specify variables for yourself as a user or a system wide specification.

When that is done you have to restart Emacs in order for Emacs to notice the change in environment variables (did you do that?).

However (as allways) there is another way to accomplish the task (I have not set my PATH to point to the Splus cmd directory). 

To see how difficult it is to make Emacs, ESS, and Splus work together I installed my version of Splus (6.0). I have ESS-5.2.9, and GNU Emacs 21.3.50.1 (i386-mingw-nt5.1.2600) of 2004-07-26 on BERATUNG4.

I have my Emacs configuration file in my home directory. This is set in the environment variable HOME, as you can set similar to the PATH. If you have not done that then Emacs probably expect to find .emacs in the root of your harddisk (e.g. c:\). However, let Emacs decide for you where you have you HOME just by doing the following in Emacs.

Load a file in a buffer by using M-x find-file, which is bound to the key C-x C-f (here M is the Meta button on the keyboard, C is the CTRL). Then in the mini buffer you will see

Find file:

Type in ~/.emacs <RET> in the minibuffer (the ~ is expanded to reflect your home directory)

where <RET> is a carriage return.

Now you should see the correct configuration file for Emacs which you allready must have created since you have ESS loaded allready.

If not then a minimal .emacs to get ESS and R and Splus to work is (showing mine reflecting my installation paths):


;; ESS 
 
(add-to-list 'load-path "C:/cygwin/usr/local/ess-svn/lisp")
(require 'ess-site)

(setq-default inferior-S+6-program-name "C:/Progra~1/Insightful/splus6/cmd/splus.exe")

(setq-default inferior-R-program-name  "c:/Progra~2/R/rw2011/bin/Rterm.exe")  ; msdos systems

That is, launch Emacs, type M-x S+6 and Splus 6.0 should start. However I got the message 

S-Plus 6.0 for Microsoft Windows has a bug that
prevents it from being started by emacs.  Instead, you must start it
by double-clicking an icon.  Then you can connect to it with
`S+6-existing'.  You should consider upgrading to S-Plus 6.1 or higher.

in the minibuffer.

This is a limitation of the Splus software which the ESS developers can do nothing about, but the message is displayed to help users to circumvent the problem. I were not able to get sqpe.exe to run in a buffer in Emacs, but I believe that is another limitation of the particular release of Splus.

However what I did, was launching Splus manual, rembering the working directory of Splus. I then did

M-x S+6-existing

and was asked to set the working directory in the minibuffer, which I did (to the same directory in which Splus was started).

Voila, things run now smoothly. I'm now able to open a buffer (e.g. tmp.S) and type in commands which I'm able to send to the Splus process by e.g. C-c C-j and the likes. The output is shown in the command window (which is assumed opened after the Splus launch) of Splus.

This is how easy it is.

The ESS package is a fairly complex suit of LISP functionality which certainly not is easy to grasp in a few seconds. This in conjunction with the complexity of Emacs, operating systems and statistical software makes it not easy to write good documentation understandable by novices.

However, it is my experience that when I can't make things work, and the documentation do not lend an easy solution, it is usually not the documentation to blame but the limitation of my understanding of hows things work, and how they should work. When the problem is solved I can go back to the documentation and now better understand what before looked like nonsense to me.

Again I thank the developers as Emacs, ESS and in particular R together makes my working life easier.

PS. Now I can uninstall Splus again, since there is really no reason for using Splus since R can do the same and much more (thanks to R-developers).




< snip>




More information about the ESS-help mailing list