From Atriplex
Jump to: navigation, search

The R Project

Advantage to Using R

There are a number of reasons R should be part of your statistical toolbox.

It's Free as in Beer

R is completely free to download, as are all the add-on libraries you might require. This stands in contrast to common commercial statistical software, which can often be extremely expensive, unaffordable to many students. You may find that one institution you work at offers one commercial statistical program installed as standard on their computers, while the next place you work at has another, and you would end up having to learn both. If you familiarize yourself with R, you'll always be able to access the software you're used to. Similarly, the cost of purchasing upgrades for commercial software is high, so the version you have access to on your office computer may be out of date. With R, updates are free, and you can upgrade quickly whenever a new version comes out.

It's Free as in Speech

R is developed, free of charge, by a team of programmers and statisticians. And they make the source code of the project available - this is vital in scientific software. You want to be confident that your analysis was performed correctly, and that there were no hidden bugs or mistakes in the program. Open source software is under constant scrutiny by the people who use it every day, and bugs are found and fixed quickly. Commercial software remains a black box, and incidents in the past have revealed how dangerous this can be. The open source nature of R means you're free to contribute your own code and add to the project.

It's Multi-Platform

Pre-compiled, easy to install R packages are available for Windows, MacOS, and Linux, and the source code is also available to compile for numerous other operating systems and platforms. It doesn't matter what kind of computer you're using, R will be available for it, from super-computers, to your web browser.

Reusing Code is Easier than Pointing and Clicking

Most desktop applications these days operate with a point-and-click graphical interface. This is convenient if you're editing a photo, or producing a document. But there are advantages to a command line / code-based approach for statistical computing. Primarily, it gives you the ability to take what you've done in the past, and build on it. Your analysis pathway doesn't consist of a pile of clicks on buttons and menus (you might forget to click something important when you repeat the analysis), it consists of a series of clear, step-by-step instructions, that you can simply run again, or modify, when you want to apply them to new data. Long-term users of R tend to build up a library of scripts to perform common analyses, which means reproducing those methods is quick and simple, and a record of the analysis pathway is maintained for future reference and validation.

It Help you Understand what you're Doing

The point-and-click graphical interfaces of common commercial statistical programs tends to isolate the user from the mathematics of what they're doing. I've found, using R, I've gained a much deeper understanding of what the statistics actually mean, and how the analyses are performed. Reading, using and running other people's R code is a great way to learn about R, and about statistics.

It's Extensible

Throughout this guide, you'll read lots of references to libraries. These are add-ons to R that provide additional functionality for specialist statistical methods, or specific fields. Hundreds of libraries are available, and adding them to your R installation involves only a few clicks of the mouse. There are libraries that offer 3D graphics, libraries that simplify vegetation community analysis, libraries for genetics and spatial data.

It Plays Nicely with Others

R can easily load data in a wide variety of formats. Plain-text .CSV files, or Excel spreadsheets are simple to access. R offers connectivity to relational database systems like Microsoft Access, MySQL or Postgres SQL. There are R libraries for loading spatial data, from ESRI shapefiles for example, or HDF files, or XML files. You can even access data stored on the web directly - all you have to do is give R the URL of the file instead of the filename, and it will download it.

Up to: R_for_Modern_Ecology