1.4 Installation in your own computer

You are allowed to bring your own laptop to the labs. This may have a series of benefits, such as admin privileges, saving all your files locally and a deeper familiarization with the software. But keep in mind:

If you plan to use your personal laptop, you are responsible for the right setup of the software (and laptop) prior to the lab lesson.

Regardless of your choice, at some point you will probably need to run the software outside UC3M computer labs. This is what you have to do in order to install R + R Commander in your own computer:

  1. In Mac OS X, download and install first XQuartz and log out and back on your Mac OS X account (this is an important step). Be sure that your Mac OS X system is up-to-date.
  2. Download the latest version of R for Windows or Mac OS X.
  3. Install R. In Windows, be sure to select the 'Startup options' and then choose 'SDI' in the 'Display Mode' options. Leave the rest of installation options as default.
  4. Open R ('R x64 X.X.X' in 64-bit Windows, 'R i386 X.X.X' in 32-bit Windows and 'R.app' in Mac OS X) and type:

    install.packages(c("Rcmdr", "RcmdrMisc", "RcmdrPlugin.TeachingDemos",
                       "RcmdrPlugin.FactoMineR", "RcmdrPlugin.KMggplot2"),
                     dep = TRUE)

    Say 'Yes' to the pop-ups regarding the installation of the personal library and choose the CRAN mirror (the server from which you will download packages). 'Spain (A Coruña) [https]', usually works fine – try a different one if you experience problems.

  5. To launch the R Commander, run R and then

    library(Rcmdr)

Mac OS X users. To prevent an occasional freezing of R and R Commander by the OS, go to ‘Tools’ -> ‘Manage Mac OS X app nap for R.app…’ and select ‘off (recommended)’.

If there is any Linux user, kindly follow the corresponding instructions here and here.

By default R and R Commander will have menus and messages in the language of your OS. If you want them in English, a simple option is to change the OS language to English and reboot. If you want to stick with your OS language, another options are:

  • Windows. Create a shortcut in your desktop, either to 'R x64 X.X.X' or to 'R i386 X.X.X'. Add a distinctive descriptor to its name, for example 'R x64 X.X.X ENGLISH'. Then 'Right mouse click' on it, select 'Properties' and append to the 'Target' field the text Language=en (separated by a space, see Figure 1.1). Analogously, use Language=es for Spanish, Language=it for Italian, etc. Use this shortcut to launch R (and then R Commander) in the chosen language. Click 'Apply' and then 'OK'.

    Modification of the R shortcut properties in Windows.

    Figure 1.1: Modification of the R shortcut properties in Windows.

  • Mac OS X. Open R.app and simply run

    system("defaults write org.R-project.R force.LANG en_GB.UTF-8")

Then close 'R.app' and relaunch it. Analogously, replace en_GB above by es_ES or it_IT if you want to switch back to Spanish or Italian, for example.