Prerequisite

This procedure is to be performed BEFORE the training. It can take several minutes.

Downloads

R and RStudio

Two mandatory files are to be downloaded:

  1. The latest version of R:
  1. The latest version of Rstudio Desktop, free version:

For Windows users:

If the training includes package creation, you can download Rtools (this is optional, we can do without it):

https://cran.r-project.org/bin/windows/Rtools/>

Remember to choose the version compatible with the version of R you downloaded.

Git

If the training integrates collaborative work with GIT, you will need to download Git (64 bits, if possible):

R

Installing R on Windows

You can start the installation of R.exe. Accept all default settings. An icon should appear on your desktop.

R is then installed. You can check this by clicking on the above icon, or by launching Rgui.exe. The following window should open:

R installation on Mac

Open the downloaded file: R-3.*.*.*.pkg. Follow the classic installation process, accepting and continuing to the message “Installation was successful”. Install R for all users, or only for yourself. You may be asked for your password, in which case, enter it and continue.

Then, go to your Applications folder. You will find the R icon there. Click on it, and you should land on an interface like this one:

R installation on Linux

The installation of R is specific to your distribution. We advise you to follow the instructions available in the corresponding folder on https://cran.r-project.org/bin/linux/.

RStudio

Installing Rstudio on Windows

Rstudio can be seen as a graphic overlay for R. We therefore recommend that you install it after R.

Run rstudio.exe using the default settings.

Installing Rstudio on Mac

Open the downloaded file: RStudio.dmg. The window below appears. Simply drag the RStudio icon into the Applications folder.

RStudio installation on Linux.

The installation of RStudio is specific to your distribution. We advise you to download the corresponding installer, and let yourself be guided.

Training packages

Once Rstudio has been installed, you will see this icon on the desktop (Windows), in your Applications folder (Mac / Linux):

Launch Rstudio and you will see (more or less) the following interface opening:

In this interface is located at the bottom left a zone called the “console”" (it is written on it), in which you will have to copy (or copy and paste) the following lines:

source("http://thinkr.fr/R/install.R")

If you do not copy and paste, remember to capitalize the R’s exactly as in this document.

Then press `ENTER’ on your keyboard, and the R configuration procedure will start. A set of packages will be downloaded and installed automatically on your computer. This may take a little time.

If dialog boxes ask you to validate things, say yes to everything, by entering o or y, depending on what R.

Here is an example of what you should see in the console if everything goes well. You will note the list of packages, which must all be at TRUE at the end of the procedure (if some are not, it doesn’t matter as long as the majority is).

source("http://thinkr.fr/R/install.R")

Git

Installing git on Windows

You can follow the procedure with the default settings by making sure to tick:

  • “Use Git from the Windows Command Prompt”
  • “Checkout as is, commit as-is”

Installing git on Mac

To install Git, open the downloaded .dmg file, then run the .pkg that will open. Follow the installation steps by clicking on the tabs to accept.

If this message is displayed:

You must go to your System Preferences > Security and Privacy > Open anyway.

Installing git on Linux

The installation of git is specific to your distribution. We advise you to follow the procedures explained on the download page:

https://git-scm.com/download/linux>

Rtools (Windows)

By leaving all default settings you can run Rtools.exe and follow the procedure. If you want to check that the installation of Rtools went well, you can launch it in the console:

devtools::find_rtools()

If the answer is TRUE it’s fine. If it is FALSE there is a problem in the installation, but don’t waste too much time with that, we can do without this tool.

Contact

If you have a problem or there are a lot of packages at FALSE, you can reach us at: * mailto:[email protected] * 06.23.83.10.61