R and RStudio

R and RStudio

Disclaimers:
  1. This article is written by somebody who does not work with R on the regular basis. 
  2. While R is frequently used on myDRE, please understand, anDREa is tool agnostic and formally does not provide support to tooling such as R
  3. While the installation of R-packages and Bioconductor packages work, there might be an R-way that is much better.
  4. Used and installed with default settings:
    1. R-4.2.0-win
    2. rtools42-5253-5107
    3. RStudio-2022-02.3-492 

Create External Access Rule for the Workspace

These steps you perform in the mydre.org portal.
Be aware: Only Owners can create an external access rule!
Navigate to your workspace and go to the tab External Access.
  1. Select the VM on which you want to open up the internet port.
  2. Click the green and white plus button on the top left (Create new rule) and a pop-up will appear.
  3. Fill in the following details. Press Save.

    Rule
    IP address
    Port
    Reason
    CranRProject443
    137.208.57.37
    443
    Access to cran.r-project.org
    CranRProject80
    137.208.57.37
    80
    Access to cran.r-project.org
    Bioconductor443
    129.217.206.11
    443
    Access to bioconductor.org via http://bioconductor.statistik.tu-dortmund.de
    Bioconductor80
    129.217.206.11
    80
    Access to bioconductor.org via http://bioconductor.statistik.tu-dortmund.de

  4. Make sure you enable the rules by ticking the boxes, followed by ticking the box next to Yes, I accept [name] and press Submit.

Get R and RStudio for Windows

These steps you perform on your own desktop. 
There might be a software share available.
  1. Download RStudio: https://rstudio.com/products/rstudio/download/#download
    If the ports are open, you can download directly from within the VM.
  2. Download R: https://cran.r-project.org/bin/windows/base/
  3. Optional: Download an appropriate version of Rtools if needed: https://cran.r-project.org/bin/windows/Rtools/
  4. Download the attached files
    1. config.yaml
    2. Rprofile.site
  5. Upload the .exe files to your workspace by drag and dropping them in the Files tab.

Install R and Rstudio on Windows VM

These steps are performed in the VM.
As always only Owners can install software.
R
  1. Find R executable in an Inbox.
  2. Copy to desktop  (is faster)
  3. Right click the executable, run as administrator.
  4. After finishing the setup, delete the executable from the desktop.
RStudio
  1. Find RStudio executable in an Inbox
  2. Copy to desktop (is faster)
  3. Right click the executable, run as administrator
  4. After finishing the setup, delete the executable from the desktop
RTools
  1. Find RTools executable in an Inbox
  2. Copy to desktop (is faster)
  3. Right click the executable, run as administrator
  4. After finishing the setup, delete the executable from the desktop

config.yaml and Rprofile.site
  1. Copy to desktop
    If you want to use a different version of R than R-4.2.0, you need to open Rprofile.site (with Notepad++) and make changes there
    If you want to use a different version of Bioconductor than 3.15,  you need to open Rprofile.site (with Notepad++) and make changes there
  2. Open file explorer, navigate to: c:\Program Files\R\R-4.2.0\etc
  3. Drag the files in that directory

It is strongly advised to install packages in ADMIN mode (right click R or RStudio, run as admin), this ensures the installed packages are available for any user accessing the Windows VM.
  1. Find Rstudio in the startmenu, right click > More > Run as administrator.
  2. install all packages, including Bioconductor packages with
  1. install.packages(<packages>)


    • Related Articles

    • Installing R and Bioconductor packages

      Recently some users experienced issues with accessing R-packages and Bioconductor-packages. The article R and RStudio has been rewritten in order to easily install R and Bioconductor-packages in your Workspace.
    • Castor R-Package

      Prerequisites DRE: Owner access to workspace, to install R / RStudio / Rtools in a virtual machine External access to CRAN in the workspace where you want to export the data to (open up port rule) External access to Castor in the workspace where you ...
    • Windows-OSDS/1.0.0 Open Source Data Science

      Windows-OSDS/1.0.0 Open Source Data Science VM template OS Windows Server 2019 Web browsers Chrome (default) Default download location: request  Microsoft Edge Utilities Notepad++: 7.9.5 Set as default according Notepad++ Z-zip Post VM creation ...
    • Windows-UMCG-SPSS/0.0.1

      Important! This image may only be deployed in UMC Groningen workspaces. It is not permitted to deploy the template in a workspace of a different workspace. Thanks for understanding! Deploying this VM template in a different workspace will render SPSS ...
    • Software support

      For all AUMC, EMC and UMCU workspaces: access to software using the Radboudumc license servers (e.g. Stata, Matlab, SPSS, Atlas.ti or anything that needs a license and is installed from the Install DRE applications manager) has been revoked from ...