This section describes how to install R, Rstudio, and a set of important packages for the course.
Download R from the CRAN page: https://cloud.r-project.org/. At the top of that page, choose the Download R link corresponding to your operating system.
If you use Windows, follow install R for the first time, then click the link to download R. The installation procedure is like any other software, and you can safely use all default options.
If you use Mac (OS X), download the pkg installer that matches you OS version and install like any other software
Linux users are advised to use their package manager.
Download and install the Rstudio Desktop Open source edition: https://rstudio.com/products/rstudio/download/#download. Choose the installer for your operating system and version. Install as any other software.
Start Rstudio and install the following packages:
If during any of the package installation steps, you get asked to update some packages, for example with a message like
Old packages: 'tinytex', 'TSP', 'tximeta', 'umap', 'vctrs', 'waveslim',
'xcms', 'xlsx', 'xml2'
Update all/some/none? [a/s/n]:
You can answer
a to update all your packages.
To be able to compile Rmd files into pdf, you will also need to
install an additional software. On Windows, the easiest is to
tinytex direct from the R console with
tinytex::install_tinytex25. For Max OSX, you will need
provides details. For linux, use your package manager to install
the tex-live suite.
Compilation to html will not require any additional installations and can also be used.
An alternative to local installation is to use virtual machines that run in the cloud. Here, we will use Renku platform provided by the Swiss Data Science Center (SDSC).
Create a new renku user - click to Login - Sign up button on https://renkulab.io/, click Register at the bottom of the login screen and follow instructions.
Once completed, you will get to the following (or similar) screen,
belonging here to user
The second support video below also demonstrates the following steps for another renku project.
in the rop right corner (see previous screenshot). You can keep all
the default values in the popup window and click on
Environments tab and the
New button to create a
runnable cloud environment that contains R, RStudio, and all
pre-installed packages. At this stage, if you already see an
interactive environment (with a green tick box), you can
immediately skip to step 8. Otherwise, the building could take up
to 50 minutes (depending on caching). You can safely shut your
computer down at this stage, as the environment is built in the
1G of RAM. For this course, these low resources are
Connect button to
start RStudio in the cloud.
The RStudio instance has already all the required packages
pre-installed. To close the remote RStudio, either use
q() in the R
Quit Session, or the red round icon in the
top corner. Next time, it won’t be necessary to repeat all the
steps. Simply navigate to your project’s environment tab, rebuild the
environment in a matter of seconds and connect. The video below
illustrates these very same steps.
Here’s a shorter video that shows the forking using the new Renku interface. While the interface has changed, the steps are essentially the same.
It is easy to upload files directly to the remote RStudio instance by
Upload button in RStudio’s file navigator menu. To
download files or directories, select the files/folders in the file
menu and click on
More and then
Export. The video below briefly
illustrates this and demonstrates how to save any changes (including
new files and folders) back to Renku.
Note that projects can only be forked once. If you want or need to fork the WSBIM1207 Renku project again, you first need to delete your existing fork:
You can now restart the procedure described above.
Figure 12.10: Save your files to RenkuLab.
Save to RenkuLab. This will make
sure that your files are safe even when the environment is closed
Students at the UCLouvain can use the Universal Desktop Service (UDS) to access the software and files installed on the university network through a virtual working environment.
There might be messages or event errors during the
tinytex. At the end, you can run
tinytex:::is_tinytex() to verify if it installed successfully
TRUE is returned).↩︎
Given that the resources are provided for free by the SDSC and are shared by all users, it is good practice to only use the resources that are needed.↩︎
Page built: 2024-02-22 using R version 4.3.2 Patched (2023-12-27 r85757)