Tag Archives: R

Teaching R to Undergraduates Part 1, Why R and How to Install it

Teaching R to Undergraduates Part 1, Why R and How to Install it (work in progress)

 # This will be a rough draft of what I hope to provide for students in my research class in the fall.  Suggestions/questions welcome.

 First, what is R and why are we using it?

 ·        R is a free software environment for statistical computing and graphics.

·        Have I mentioned that its free and can be used on multiple platforms (windows, mac, linux)

 So it’s free, but is it any good?

 ·        R is used by many academics, and companies around the world.  Google and Health Canada both use R for example.   http://www.revolutionanalytics.com/companies-using-r

·        It is a living program, in that it has a community constantly building and adapting the program.  

·        It can provide very powerful tools for analyses and graphics. 

·        It is considered to be as useful if not better than SPSS or SAS

 Why don’t we just use SPSS or SAS since the University provides it for free on its computers?

 ·        If you just plan on using University computers for the rest of your life than that can work.  But what if you want to use your own computer or if you are working/interning somewhere that won’t let you move their data off of their computer, what will you use then?

·        SPSS and SAS are expensive programs and require yearly patches to continue working after its initial purchase.  You don’t really buy the software as rent it from year to year.  SPSS has a special student price, but you can’t use it after you graduate.

·        If you are working for a nonprofit or other small organization, expecting them to spend thousands of dollars on software per year may not be very sustainable.  That same amount could be used to provide direct services or develop other goods. 

 So how do I install it?

·        The first step is to download the latest version.  Case Western Reserve hosts a depository that you can access it and other needed packages (more on that later).

o   GO to http://cran.case.edu/ and click on the version for your system (window, mac, or linux) and install it onto your system using the direction provided.

o   Once installed, run the program you should see this.

 ·        Next, make sure that you have java installed on your computer, if you don’t have it or don’t know got to http://www.java.com and find the right version for your system.  If you have a 64 bit computer, make sure you have the 64 bit version of java.  This program will be needed to run the Graphic User Interface (GUI) that we will be using.

 ·        We will be using the Deducer GUI to work with R.  It’s not necessary, but it will be easier to work with for beginners.

 o   At the top of the R program you should see an option for Packages, click on that.

o   You should see an option for Install package(s), click on that.  You should be given a list of cran mirrors.  Scroll down and look for USA (OH) option.  Click on that and hit OK.

o   Next, you should see a list of Packages.  Scroll down and look for Deducer.  Click on that and hit OK.

o   That will install Deducer and any related package.

o   Once finished, go pack to Packages and look for Load package(s) and then click on it.  You will be given a list of packages available.  Look for Deducer and click on it, and then click OK.  The program will attach itself and you will see additional options available on the tool bar after Help on the right.  You should see Deducer, Data, Analysis, and Plots.  If you do that means that its installed and ready to go. 

 The next part will cover inputing data and simple statistics.