[R-sig-eco] script editor -- emacs [OT]

tyler tyler.smith at mail.mcgill.ca
Wed Apr 23 17:49:01 CEST 2008


"Christian A. Parker" <cparker at pdx.edu> writes:

> I also like Tinn-R on a windows machine.
>
> But I have another question, Ive recently switched one of my computers
> over to Ubuntu (Linux). ... So I was wondering if anyone out there ...
> had some advice or knew of a tutorial for EMACS+ESS for the reluctant
> Tinn-R user?
>

Emacs is a fairly complex piece of software, but one that repays the
relatively modest investment in learning to use it. What I would suggest
for beginners is:

(assuming you've already installed emacs and ess, which is easily done
in Ubuntu via apt/aptitude/synaptic, or on Windows from the links
provided on the ess website)

Start with the online emacs tutorial. You get into it by typing
Control-h t after starting emacs. This will guide you through the basics
of Emacs use. Some of it will seem very basic, other parts quite
esoteric. The main things to understand at this point are the concepts
of multiple buffers/windows/files. There are lots of keyboard shortcuts
that you can safely ignore to begin with, as you can use your arrow keys
and mouse to navigate around as you would in any other editor. 

The next step is to start an R process, with Alt-x R. ESS will
automatically load for you, and you can discover the basic functionality
by playing with the menu-bar and drop-down lists.

Finally, open up an .R file and explore the menu-bar to find out how to
send code from your script to the R process. This is where it becomes
important to understand switching between different buffers as you
alternate between your script and the output it produces.

Over time, you will find that just about anything you'd want to automate
has already been done for you, so that you find yourself using the mouse
and menu-bar less and less, as keyboard shortcuts become second-nature.
Having at least browsed the emacs tutorial is important in this respect,
so that you'll have at least a faint recollection of the sorts of things
that Emacs can do for you. Eventually you'll want to read the ESS
manual, but a lot of people quite happily use Emacs/ESS without getting
much past the basic functions.

In a nutshell: don't try and learn everything at once. Start with the
very basics, and add new functions to your repertoire one at a time, as
you need them.

Despite all the complexity that is Emacs, there are only two possible
outcomes from all this. You will either experience a strong, even
visceral revulsion, or you will see the light and realize that Emacs
isn't so much a software tool as a way of life.

HTH,

Tyler

-- 
Support standardized open formats and control your own data -
	Reject Microsoft OOXML

http://noooxml.org



More information about the R-sig-ecology mailing list