R: Installing R and Rcmdr

From MathWiki

(Difference between revisions)
Revision as of 21:20, 7 Jan 2015
Georges (Talk | contribs)
On a MAC
← Go to previous diff
Revision as of 18:15, 13 Sep 2017
Georges (Talk | contribs)
On a PC
Go to next diff →
Line 2: Line 2:
Make sure you are connected to the internet. The faster the connection the better. Wireless York connections are adequate. Avoid using a dialup line unless you are ready to wait a very long time. Make sure you are connected to the internet. The faster the connection the better. Wireless York connections are adequate. Avoid using a dialup line unless you are ready to wait a very long time.
=== On a PC === === On a PC ===
-* First install R. See [http://scs.math.yorku.ca/index.php/R:_Getting_started_with_R Getting started with R].+* First install R. See [http://scs.math.yorku.ca/index.php/R:_Getting_started_with_R Getting started with R]. Just use the 'Quick Start' instructions.
* Click on the R icon on your desktop. * Click on the R icon on your desktop.
* In R, type (after the '>' prompt): * In R, type (after the '>' prompt):

Revision as of 18:15, 13 Sep 2017

Table of contents

Installing R and Rcmdr (one time only)

Make sure you are connected to the internet. The faster the connection the better. Wireless York connections are adequate. Avoid using a dialup line unless you are ready to wait a very long time.

On a PC

  • First install R. See Getting started with R (http://scs.math.yorku.ca/index.php/R:_Getting_started_with_R). Just use the 'Quick Start' instructions.
  • Click on the R icon on your desktop.
  • In R, type (after the '>' prompt):
> install.packages("Rcmdr", dependencies = TRUE)
  • This will take a while. Once everything is installed, type:
> library(Rcmdr) 
in the R console window. R will then prompt you to install all the additional packages that Rcmdr uses. Click on the appropriate boxes to accept. The whole process can take 10 minutes on a fast connection.

On a MAC

  • First install R. See Getting started with R (http://scs.math.yorku.ca/index.php/R:_Getting_started_with_R).
  • Then install Rcmdr. John Fox has prepared detailed instructions for installing Rcmdr on a Mac. See this page and scroll down to the heading Mac OS X (http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html).
  • Maybe all you need to do is to type:
 > install.packages('Rcmdr', dependencies = TRUE)
  • After the downloading stops, type:
 > library(Rcmdr)

Using R and Rcmdr in Windows or on a Mac

  • Click on the R icon on your desktop
  • Type (after the '>' prompt):
> library(Rcmdr) 
followed by "Enter" in the R console window. The first time you do this, make sure you are connected to the internet with a reasonably fast connection because Rcmdr will install a number of other packages. Once the packages are installed, they don't have to be installed again and you can use R and Rcmdr without an internet connection -- except, of course, if you want to download data sets.
  • The Rcmdr window will appear.