Installing R

Introduction

RlogoWhat is R?

Very few researchers compute statistics by hand. Most make computers do their statistics for them. Also, some statistical routines are impossible to do without computers.

 

Several programs are available for data analysis, including SPSS, Excel, SAS, Matlab, Minitab, and R. Several of these programs have a familiar and easy to use interface (such as SPSS, Excel, and Minitab)–in these programs you simply point and click in order to analyze your data.

However, ease of use often comes at the expense of flexibility. Some programs (such as Excel or Minitab) only allow the user to do basic statistical analysis and data manipulation. However, the “big dawgs” like to use programs that are much more flexible, such as SAS and R.

Programming Statistics

While Excel and SPSS have point and click interfaces, R does not. Instead, the user must program their statistical analysis. For example, to perform a regression analysis in Excel is a simple matter of pointing and clicking. R, on the other hand, must be told through a computer language how to perform the statistical analysis:

lm(y~x, data=testData, subset=(group==1))

Don’t worry about what interpreting the code just yet, but you can see that things become a little more complicated when the user must code their statistical analysis rather than pointing and clicking. However, with that added complication comes added flexibility.

However, explaining what R is, it’s probably better for you to dive in. In the next chapter, we will show you how to perform some rudimentary R operations to give you a feel for how to “speak” the R language. After that, we’ll dive in to some more advanced R programming.

What This Tutorial Is and Is Not

This tutorial does not provide comprehensive documentation of the R language. Instead, it’s a brief introduction to the language to help you get your “feet wet.” I have learned several programs in my lifetime, and I’ve found the best way to learn them is to have a short introduction, then spend the rest of the time messing around with it. So, with that, let’s wet those feet of yours!

Installation

R is available for download for free from CRAN (mac download | pc download). To download it, first visit the website, then click on the link that says, “Download R For…” Since I’m working on a Mac, I clicked on the second link.

Next you will be taken to a screen where you can actually download R. Click on the top-most link (make sure you have an operating system that meets the minimum requirements). If your OS doesn’t meet the minimum requirements, then choose a file that does.

Then you wait! The download shouldn’t take too long. After it downloads it, open the file and allow R to install on your machine. Congrats! You just installed R!

Next, the R Interface

3 thoughts on “Installing R

Leave a Reply