Notes on R


  1. go to
  2. under 'Getting Started' click on 'download R'
  3. click on a mirror site
  4. click on the link for your operating system (OS)
  5. choose 'install for the first time' (these instructions aren't meant for upgrading!)
  6. download and save *.exe, where * corresponds to your OS
  7. run *.exe
  8. choose no (accept defaults) but add shortcuts
  9. in Windows, the R executable is
    C:\Program Files\R\R-[version]\bin\x64\Rgui.exe
    where [version] is the latest version number and
    Rgui stands for the R graphical user interface

Run R

  1. if R was successfully installed you should be able to click on the Rgui
  2. the R window should come up
  3. type a few commands in the console - they don't have to be syntactically correct!
  4. to exit from R click File > Exit
  5. you'll probably not want to 'Save workspace image' but you may want to save the script you may have been running and editing

Install packages

  1. run R and in the console click on Packages > Install package(s)
  2. choose a mirror site
  3. scroll down and select the package you want; e.g. maps, then click OK, and the console will report on the installation progress
  4. to make the package's functions and data available, type library(maps) (or the appropriate library), and you should get confirmation messages
  5. you'll now be able to access the package's functions and data (e.g. if you type map() a map of the world should appear)

Lee De Cola