[ESS] ESS and Emacs Documentation for Dummies

Mark Leeds Mleeds at kellogggroup.com
Mon Jan 2 20:07:40 CET 2006


Kasper : if you can add something to the
4th section  about how to control the
R working directory when you do M-X R, I 
can make a new  revised document in HTML.  
Thanks.   ( I'll also play around today
and see if I can figure it out myself ).


                              Mark




-----Original Message-----
From: Mark Leeds 
Sent: Monday, January 02, 2006 1:05 AM
To: 'ESS-help at stat.math.ethz.ch'
Subject: ESS and Emacs Documentation for Dummies


What I did was just go through
Kasper's original documentation and put some 
asterisks around where I think stuff needs to
Be added/modified in each section.

Martin : I think you were
the person who asked about the documentation
so if you want to tell me what
to do to make this documentation
"official", I have no problem trying
to do this ( unless Kasper wants to continue. I
feel like I owe this list some service ).
I haven't used latex in years but I am willing to download 
Miktex ( oh no !!!!!! that could
be scary ) and try to rel-earn it etc.
or maybe microsoft word is enough ?

Also, the last section of below still
needs some work but I couldn't
add anything because I didn't know
the answer to my question.


Below is Kasper's Original documentation
along with my adds/comments.










Installation of ESS+Emacs under Windows
=======================================

## Versions ##

Last updated 2005-12-31 using ESS 5.2.11, R-2.2.1 and a danish version
of Windows 2000.

## Some background ##

There are two different releases of Emacs: GNU Emacs and
Xemacs. Until recently Xemacs came with a large bundle of packages as
well as a windows installer, meaning it was relatively easy to install
for an Emacs newbie. On the other hand, updating the ESS package for
Xemacs was harder than doing it for GNU Emacs.

Recent posts on the ESS mailing list have indicated that Xemacs no
longer ships with ESS   ( *************** Mark Leeds change so below is
documentation installing ESS with GNU Emacs )

## Installing GNU Emacs ##

Get the newest release of GNU Emacs for Windows from
   [gnu-emacs](http://ftp.gnu.org/gnu/windows/emacs)

There are several files in this location. I have been using
`emacs-21.3-bin-fullbin-i386.tar.gz`

Download the file and extract it. Any reasonable zip utility for
Windows ought to handle `.tar.gz` files. I suggest extracting the
files to a temporary directory. This directory will now contain
`emacs-21.3` with the subdirctories `bin`, `lisp`, `etc`, `doc`,
`site-lisp` Copy the `emacs-21.3` directory to the place you want to
install Emacs, I suggest `C:\Program Files`. Then run the program
`emacs-21.3/bin/addpm.exe`, which will add Emacs to your start
menu. You may want to add a shortcut to `emacs-21.3/bin/runemacs.exe`
to your desktop and/or quicklaunch bar.

Emacs is now installed.

************************************************************************
****

Mark Leeds' changes to this section  ## Installing GNU Emacs ##

When you want to download emacs, you go to the site above but the file
is called emacs-21.3-fullbin-i386.tar.gz. When you save it in Windows (
to whatever directory you like ), the file gets renamed automatically to
emacs-21.3-fullbin-i1386.tar.tar. In order to be able to subsequently do
the extraction using a winzip program, you have to take off the last
".tar" in the name ( I renamed in the file at a dos prompt ) before
winzip will unzip it. If you don't do this, winzip will give an error on
extraction.


************************************************************************
****


## The HOME directory and .emacs ##

Emacs is configured either using a local or a global configuration
file. Unless you are a sys admin installing a multiuser system, the
local configuration file will be sufficient. On Windows that file is
called `_emacs` and the default location is `C:\` or where the HOME
environment variable is pointing to. In Emacs documentation that file
is referred to as .emacs (dot-emacs).

Depending on your system it may or may not be useful to setup your
HOME variable properly. The advantages are that it allows for
different .emacs files for different users (of course irrelevant for a
single user system) and that the ~ character expands to the HOME
directory, as *NIX users may be used to.


Setting the HOME is different depending on what version of Windows you
are running. On Windows 2000 you right-click on "My Computer", select
properties -> advanced -> environment variables, and then create a
variable called HOME pointing to the relevant home directory.

************************************************************************
****

Mark Leeds changes to this section ## The Home directory and .emacs ## :

As far as I could tell, GNU Emacs does not install a .emacs file during
installation so I just made one myself and put it in the directory
HOME which in my case was C:Documents and Settings\mleeds.

One can find the value of HOME in windows by typing echo
%HOMEDRIVE%%HOMEPATH% at a dos prompt.

************************************************************************
*

## Installing ESS ##

Download the latest version of ESS from
[ess.r-project.org](http://ess.r-project.org)

This comes in form of either a tar.gz or a .zip archive (there are no
differences between the two archives). Extract the contents of the
archive into `emacs-21.3/site-lisp`. That will create the directory
`emacs-21.3/site-lisp/ess-5.2.11`.

We now need to load ESS. This is done by placing the following command
in the .emacs file:

     (load "C:/Progra~1/emacs-21.3/site-lisp/ess-5.2.11/lisp/ess- 
site.el")

You can test whether it works by starting up Emacs and do

      C-x C-f test.R

This should open up a buffer with an R script called test.R. If the
loading was done succesfully you should see something
like `(ESS[S] [none])` in the second to last line of the Emacs window.

************************************************************************
**

Mark Leeds' changes to the section ## Installing ESS ## : NO CHANGES.

************************************************************************
**


## Making sure that inferior-R mode works ##

Try to start R from within Emacs by executing

     M-x R

My experience is that this does not work out of the box with ESS
5.2.11. In that case Emacs will say somethng like "Unable to locate
Rterm.exe". In that case, add the following to your .emacs

     (setq inferior-R-program-name "C:/progra~1/R/R-2.2.1/bin/ 
Rterm.exe")

********************************************************************

Mark Leeds' changes to the section ## Making sure that inferior-R mode
works ## :  

This seemed to work right away
for me. I didn't need the setq inferior command above but it was 
asking for a .Rprofile file which I didn't have and the default working
directory is C:/Program Files/emacs-21.3/bin which is not preferred by
me.
I would like the working directory of R 
to be controlled by me but I am not sure how to
do this ( control the working directory when
it starts up ) but this is probably something that should
be added. 

************************************************************************
**


END OF DOCUMENT





******************

On Dec 31, 2005, at 12:58 AM, Kasper Daniel Hansen wrote:

> If you are indifferent as to whether you are using GNU Emacs or
> Xemacs you might want to use GNU Emacs. I used that some time ago and
> it worked without problems. You will have to install ESS manually as
> Tony described. Since I am currently at a house with a windows
> computer I might even try to do it tomorrow to give you a bit more
> specific info.
>
> /Kasper
>
> On Dec 31, 2005, at 12:41 AM, Mark Leeds wrote:
>
>>
>> I found a sample.init.el file
>> that I renamed as Rinit.el and put in my
>> .emacs directory but I STILL get that "xargs" error
>> after a little loading.
>>
>> Would someone that use ESS and Emacs
>> Together on windows mind sending me their init.el file
>> And, if that doesn't work, I'll give up
>> and just tell myself that
>> I gave it my best shot.
>>
>>                   Thanks
>>
>> -----Original Message-----
>> From: Mark Leeds
>> Sent: Friday, December 30, 2005 5:31 PM
>> To: A.J. Rossini
>> Cc: ess-help at stat.math.ethz.ch
>> Subject: Re: [ESS] [R] ESS and Emacs
>>
>> Hi Mr. Rossini : I took
>> the liberties of putting
>> the load command inside
>> my Rinit.el file  and have Rinit.el as
>> the target of my Xemacs icon ( see John
>> Fox directions for how to do that ).
>>
>> Things definitely happen which is
>> a good sign that I never had before but they go
>> so fast on the bottom of the emacs page
>> ( I think one of them is "loading cus-face"
>> but I can't be sure. I've
>> tried running it atleast 20 times to
>> see if I can see what it says but I can't )
>> but then , after about a second or
>> two of loading stuff, it gives an error :
>>
>> "Searching for program : No such file
>> or directory, xargs".
>>
>> Given that I don't know Lisp, maybe
>> I should give up unless this error
>> means anything to you or anyone else.
>> Basically, I can't tell where
>> it's bombing because I have no clue about
>> Lisp. Thanks.
>>
>>                     Mark
>>
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: A.J. Rossini [mailto:blindglobe at gmail.com]
>> Sent: Friday, December 30, 2005 11:37 AM
>> To: John Fox
>> Cc: R-Stat Help; Mark Leeds; ESS-help at stat.math.ethz.ch
>> Subject: Re: [R] [ESS] ESS and Emacs
>>
>> Whoops, sorry John.  In the last few months, we took off the XEmacs
>> packaged ESS since it wasn't keeping up very well with the tarball,
>> due to complications, mis-matched release schedules/requirements, and
>> the like.
>>
>> It now needs to be installed from tarball, though there is some help
>> for that, I believe.  (someone remind me what it is!).
>>
>> On 12/30/05, John Fox <jfox at mcmaster.ca> wrote:
>>> Dear Paul and Mark,
>>>
>>> I've just taken a look at the current XEmacs setup program for
>> Windows, and
>>> it has changed significantly since the document to which you  
>>> referred
>> was
>>> last updated (about a year ago). In particular, the XEmacs setup no
>> longer
>>> gives you the option to install all packages, as I recommended.  
>>> Among
>> these
>>> is ess, which is not in the small set of packages that XEmacs
>> currently
>>> installs, nor does ess seem to be available via the packages tool in
>> XEmacs.
>>>
>>>
>>> I'm copying this response to the ESS help list, and will remove the
>>> XEmacs/ESS document on my web site so that people aren't further
>> misled.
>>>
>>> Sorry for the problem,
>>>  John
>>>
>>> --------------------------------
>>> John Fox
>>> Department of Sociology
>>> McMaster University
>>> Hamilton, Ontario
>>> Canada L8S 4M4
>>> 905-525-9140x23604
>>> http://socserv.mcmaster.ca/jfox
>>> --------------------------------
>>>
>>>> -----Original Message-----
>>>> From: r-help-bounces at stat.math.ethz.ch
>>>> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of paul  
>>>> sorenson
>>>> Sent: Thursday, December 29, 2005 11:51 PM
>>>> To: Mark Leeds
>>>> Cc: R-Stat Help
>>>> Subject: Re: [R] ESS and Emacs
>>>>
>>>> I tried it with XEmacs on Win XP and I had to install ESS
>> separately.
>>>>
>>>> Mark Leeds wrote:
>>>>> I have been using the document written by John Fox titled Sn
>>>>> Introduction to ESS + XEmacs for Windows Users of R.
>>>>>
>>>>> It's a very nice document and
>>>>> I went through it carefully but I got
>>>>> an error when I finished it and launched XEmacs.
>>>>>
>>>>> The error is "cannot open load file : ess-site".
>>>>>
>>>>> So, I did more investigation
>>>>> and it seems like there is a folder
>>>>>
>>>>> Program Files/XEmacs/xemacs-packages/etc/ess
>>>>>
>>>>> that should have been created when
>>>>> I downloaded XEmacs but it doesn't exist.
>>>>> There is a folder called efs ( rather than ess ) but I don't think
>>>>> that's it.
>>>>>
>>>>> I tried installing XEmacs again but the same thing happened.
>>>>>
>>>>> Does anyone know anything about this ?
>>>>> I am using Windows NT.
>>>>> Thanks.
>>>>>
>>>>>                                      Mark
>>>>>
>>>>>
>>>>>
>>>>
>> *********************************************************************

>> *
>>>>> This email and any files transmitted with it are
>>>>> confidentia...{{dropped}}
>>>>>
>>>>> ______________________________________________
>>>>> R-help at stat.math.ethz.ch mailing list
>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>> PLEASE do read the posting guide!
>>>>> http://www.R-project.org/posting-guide.html
>>>>>
>>>>
>>>> ______________________________________________
>>>> R-help at stat.math.ethz.ch mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide!
>>>> http://www.R-project.org/posting-guide.html
>>>
>>> ______________________________________________
>>> ESS-help at stat.math.ethz.ch mailing list
>>> https://stat.ethz.ch/mailman/listinfo/ess-help
>>>
>>
>>
>> --
>> best,
>> -tony
>>
>> blindglobe at gmail.com
>> Muttenz, Switzerland.
>> "Commit early,commit often, and commit in a repository from which
>> we can
>> easily
>> roll-back your mistakes" (AJR, 4Jan05).
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide!
>> http://www.R-project.org/posting-guide.html
>>
>>
>> *********************************************************************

>> *
>> This email and any files transmitted with it are
>> confidentia...{{dropped}}
>>
>> ______________________________________________
>> ESS-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help
>>
>>
>> *********************************************************************

>> *
>> This email and any files transmitted with it are confidentia...
>> {{dropped}}
>>
>> ______________________________________________
>> ESS-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help

______________________________________________
ESS-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


**********************************************************************
This email and any files transmitted with it are confidentia...{{dropped}}




More information about the ESS-help mailing list