Installing R on Windows and Debian
‘R’ is a statistical package. For an overview, please go to 
I just recently installed R both on my Windows XP and Debian. Regina’s www.bostongis.com is an excellent tutorial in getting involved with R. I do suggest you head first to PLR Part 1: Up and Running with PL/R (PLR) in PostgreSQL: An almost Idiot’s Guide to get you started.
The install instructions for Windows works flawlessly. I have to hold back to R-2.5 though as I plan to use RPy (Python for R), see details below. To install ‘R’ in Debian, there’s a couple of settings that we need to take care of…
- 
    Install r-base 
 sudo apt-get install r-base
- 
    Install plr on postgres 
 sudo apt-get install postgresql-8.2-plr
- 
    Using R in a database 
 psql -d beijing -U lbs -h 127.0.0.1 < /usr/share/postgresql/8.2/plr.sql
- 
    Set the R_HOME environment variable 
 /etc/postgresql/8.2/main/environment
 R_HOME='/usr/lib/R'
- 
    Restart Debian. 
RPy, R for Python, is another alternative to use R in Python. I installed it both in Windows and Debian. Note that I reverted to R-2.5 on Windows to be compatible with RPy. For Debian, Im currently using R-2.6.
For the Windows Binary Installation,
- 
    Read the RPy Main Site 
- 
    Install prerequisites: 
– NumPy
– Win32 Extensions Download
- Afterwards, install the main package, RPy Download
In Debian, its a straight forward…sudo apt-get install python-rpy