R is a popular statistical programming language used across disciplines (e.g. environmental sciences, geography, epidemiology, medical statistics). Other popular statistical programming languages include Matlab, Python, Stata and SPSS. R can be used to conduct analyses and produce tables and graphs. You can find more information about R on the official website.
RStudio is an integrated development environment (IDE) specifically designed for R. RStudio is an application which brings all the tools you need into one place in order to write code and run analyses. It is somewhat comparable with the user interface for SPSS or Stata. It is possible to run R from the command line, but unless you are an advanced user we suggest running DataSHIELD within RStudio.
To install R you can follow the instructions here.
To install RStudio follow the instructions here.
Once you have installed R and RStudio you can install the specific packages needed to run DataSHIELD. Here is an overview of the core DataSHIELD packages and what they do. To install these packages use the following script:
install.packages(c("DSI", "DSOpal", "DSMolgenisArmadillo"))
install.packages("remotes")
remotes::install_github("datashield/dsBaseClient")
To develop in R, you need three further packages:
usethis
automates common tasks in setting up an R package.devtools
contains tools for developing, testing and releasing r packages.dsLite
mimics the behaviour of a remote DataSHIELD server, and speeds up the development cycle.install.packages(c("usethis", "devtools", "DSLite"))
library(DSLite)
library(devtools)
library(usethis)