Niels Schwab | Johannes Weidinger | Maria Bobrowski | Charlotta Mirbach
RLab - Skriptbasierte modulare Umweltstatistik (Universitätskolleg 2.0)
Universität Hamburg
RLab-Impressum
Gefördert im Rahmen des „Lehrlabors“ im Universitätskolleg 2.0 aus Mitteln des BMBF (01PL17033)
Dieses Digitale Skript von Niels Schwab, Johannes Weidinger, Maria Bobrowski und Charlotta Mirbach Universitätskolleg 2.0 / Lehrlabor, Universität Hamburg, ist lizenziert unter einer Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 4.0 International Lizenz.
Universität Hamburg
Das elearn.js Template von Universität Hamburg ist lizenziert unter einer Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 4.0 International Lizenz
This is a guide to installing R (statistics program) and its 'control software' RStudio to your hard drive or external storage.
Time required: approximately 30 minutes.
Please install both programs before attending any RLab classroom session and bring your hard drive or external storage.
Please use a Windows OS (tutorial for Mac at the end of this document). You will need admin rights to the computer, so installation won't be possible on most UHH computers. Using the program on your hard drive is possible, however, as well as using the pre-installed version on our UHH computers - please note, that this version might not be the latest one.
At RLab, we use the "portable" version of R, because unlike the "normal" program version, this version also works correctly on computers that are located in a special network architecture, as is the case in some computer rooms of the university. As of recently, there is only one "normal" version of RStudio, which can also be installed on a USB stick. With this "combination" of the "portable" R version and the "normal" version of RStudio, you can be sure that the programs on the USB stick or hard drive can be used on any Windows computer.
In the context of RLabs, the "portable" R version has no disadvantages. Among other things, when processing large amounts of data or other computing-intensive tasks, it can be advantageous to use only the "normal" versions of R and RStudio.
In the following, we point out the alternative installation options for the "normal" R version at the appropriate points.
Differences between normal and portable versions
If you want to learn more about the differences between normal and portable versions, follow the link below. This knowledge is not required for the RLab.Portable Application - Wikipedia
Info for Mac users:
Rlab does not offer a guide for R and RStudio on a Mac, at the moment. This is due to a lack of routine with working on Mac in our team. We can therefor not guarantee to sufficiently teach beginners with no previous knowledge of R and RStudio. If you have no access to a Windows computer, you can look into solutions for running windows on a Mac online.
There are R and RStudio version for Mac and you may use them 'at your own risk'. Please note that you should install XQuartz when using Mac since it is not part of OS X.
Learn more about using R and RStudio on Mac OS X here.
First you will need to install RStudio ('control software') to your hard drive or external storage. From now on we will only use the term hard drive, referring to both USB drives and external storages. An external storage is preferable due to larger storage capacity. You can download RStudio for free online.
Fig. 1: Empty harddrive.
Fig. 2: URL RStudio.
Fig. 3: Rstudio paf.exe.
Fig. 4: RStudio save as.
Fig. 5: R folder after successful download.
Have you encountered a problem?
The RLab team is always grateful for suggestions and comments to improve this digital script! You can also ask questions about the content! Drop a comment!
Goal: Installation of RStudio - this application 'controls' the statistics program R.
Run „RStudio_1.0.143.exe“ (double click the file; version numbers might change)
Select the language of the installation dialogue
Fig. 6: RStudio language selection.
Fig. 7: RStudio installer.
Fig. 8: RStudio desired location.
Fig. 9: RStudio location and installation.
Fig. 10: RStudio installation complete.
Fig. 11: RStudio hard drive final.
Have you encountered a problem?
The RLab team is always grateful for suggestions and comments to improve this digital script! You can also ask questions about the content! Drop a comment!
Goal: Download R (the actual statistics program) to your hard drive. Like RStudio, R is an open source software.
Fig. 12: URL to download R.
Non-portable version
If you wish to use the 'normal' version later on, you can find it here https://cran.r-project.org/bin/windows/base/. But this is not relevant at the moment. Installation of the 'normal' version is very similar. When you install the 'normal' version you will be able to choose where R shall be installed.
Fig. 13: Select latest R version.
Have you encountered a problem?
The RLab team is always grateful for suggestions and comments to improve this digital script! You can also ask questions about the content! Drop a comment!
Goal: Installation of the statistics program R. It will later be 'controlled' by the previously installed RStudio.
Fig. 14: USB after download.
Fig. 15: Choose target directory.
Fig. 16: Installation complete.
As a result of the previous steps, there should now be two new folders in folder R on your hard drive. Your hard drive should look like this now:
Fig. 17: Installation complete.
Have you encountered a problem?
The RLab team is always grateful for suggestions and comments to improve this digital script! You can also ask questions about the content! Drop a comment!
The 'control' of R with RStudio can only work if both programs are connected. How to connect the programs is described in the following section.
The procedure varies depending on whether or not an R version was previously installed on the computer.
You can also start here if you are not sure whether another version has already been installed. This is tested in the second step and you can switch to the alternative manual if necessary.
Here we go:
Fig. 18: Start RStudio.
Fig. 19: Choose a specific version of R.
If this window does not appear and RStudio starts directly instead, a version of R is already installed on the computer. Then please go directly from here to the next chapter 'Establishing a connection if an R version is already installed on the computer'.
Fig. 20 "bin"-folder.
Fig. 21: Choose R-version.
Fig. 22: R start.
Now you can start working with RStudio and R!
To start an RLab course, the next step is to install these courses.
Have you encountered a problem?
The RLab team is always grateful for suggestions and comments to improve this digital script! You can also ask questions about the content! Drop a comment!
Fig. 23: Start RStudio.
Fig. 24: Global options RStudio.
Fig. 25: Global options: General settings.
Fig. 26: Browse for most current R version.
Fig. 27: Attention - select correct version.
Fig. 28: R start.
Now you can start working with RStudio and R!
To start an RLab course, the next step is to install these courses.
Have you encountered a problem?
The RLab team is always grateful for suggestions and comments to improve this digital script! You can also ask questions about the content! Drop a comment!