Installing StatET

EDIT: Completely ignore the advice below. R Studio is now the way to go for an R development environment. It was a viable alternative about a year after I wrote this post, and now it’s hands down the only way to go.

About StatET and Eclipse

StatET is a powerful plug-in that allows you to use R inside the Integrated Development Environment (IDE) known as Eclipse. The features in Eclipse make it easier to write code in R, unless perhaps you’re already using something more sophisticated.

Eclipse has a reputation for having a “steep learning curve”. However, I have found it to be useful even if you barely know what you’re doing. The more you learn, the more useful it becomes.

StatET has a reputation for being difficult to install. There are a few things that tricky for non-programmers. Hopefully this post will make those things more obvious.

StatET is written by Stephan Wahlbrink. The official website and more detailed instructions can be found here:  www.walware.de

System Requirements

I will be showing you how I installed the plug-in for Eclipse Indigo, using R 2.14.1. I’m using a Windows XP machine. The process is similar for Windows 7.

My Steps
Continue reading

How to upgrade to a new version of R

I updated to R 2.14.1 for the StatET instructions post (forthcoming).  While doing that, I noticed some upgrading instructions in R’s Frequent Asked Questions.

upgrade txt from FAQ 2.8

I gave it a try, but the results were a little annoying.  First of all, I had to be careful to copy over only my custom libraries, and not the core libraries (like “base” and “stats”).

Then, when I issued the update commands:
## The FAQ had ask=FALSE, but I wanted to see what was going on,
## so I set ask=TRUE
update.packages(checkBuilt=TRUE, ask=TRUE)

Unfortunately, the update.packages command updated nearly every custom package, and (oddly) a few core packages as well.  Also, I was expecting “update” to mean “just update missing files”. However, “update” meant “download the whole package and install from scratch”. So it didn’t save time or bandwidth.

I found it easier to run these commands to list the folders that are in the old library, but not in the new one:
OldFolders = list.files('C:/Documents and Settings/Gene/My Documents/R/win-library/2.13')
NewFolders = list.files('C:/Program Files/R/R-2.14.1/library')
OldFolders[!OldFolders %in% NewFolders]

Note that in 2.14 they seem to have gone back to storing the libraries in the “Program Folder” rather than in “My Documents”.  I think the original switch to “My Documents” was a work around to avoid needing admin privileges every time you install a new package / library.

Then I manually installed the libraries one by one using “install.packages”, e.g.:
install.packages(‘earth')
install.packages('zoo')
install.packages('rJava')
install.packages('tkrplot')

The manual installation is useful because
•    Some of libraries might not be available on CRAN
•    You might not need all your old libraries
•    Some libraries install dependencies, so you can skip the dependences

Every so often I would rerun the oldfolders / newfolders code to check what was still needed.

Guide to using Easy Install in Python from “sadphaeton”

While casting about looking for resources to get Numpy working (more about that later), I found a cool blog.  The author  knows what he’s talking about AND has a very down to earth tone; a very rare combination.

http://blog.sadphaeton.com/

I had Python and Numpy working for the most part, but the “easy_install” command was still a mystery. I kept seeing installation instructions various packages that said “just use easy_install”.  I’m thinking “Thanks jerks. Where and how do I use this ‘easy_install'”??  The very name “easy_install” seemed to mock me at every encounter.

As it turns out, you use it from the command window (the DOS prompt on Windows or Terminal on Mac).  Not in the Python shell.  Also, you just type “easy_install [package name]”, and the command find the URL for you (apparently located somewhere in Python heaven).

Here are the kindly posted instructions that saved me:
Part 1 – Installing Python (I didn’t use this, but it’s helpful anyway)
Part 2 – Installing Modules in Python