Pre-course setups and requirements
Keywords
Medical Statistics, OUCRU, Biostatistics, R Programming, Clinical Research
About
Here we explain how to install R and RStudio on your own computer. This is required to ensure a smooth experience and reproducible results during the course.
Installation
R
- Go to the R website
- In the column on the left hand side, click on the CRAN link under the subheading Download
- You now see a page with CRAN Mirrors. This is a list of servers from which the R software and extensions can be downloaded from
- Click on the first link
- Now both the left hand side and the right hand side of the page change (This page can be saved as a bookmark/favorite)
- On the right hand side, click on the download link for your operating system
- E.g. Windows users click on Download R for Windows, then click on base and download the program from there.
- It is recommended to install the latest version as well as to upgrade the program if a new major version is released, which is about once per year
- You can use the default installation options
RStudio Desktop
- Go to the download page
- Scroll down, look for 2: Install Rstudio and click on the button for downloading RStudio Desktop
- Download and install RStudio Desktop
- You can use the default installation options
- Open Rstudio Desktop, to check that everything has been installed correctly
- E.g. via the Start menu in Windows
R Packages
Once R and RStudio are installed, you need to install the specific libraries we will use for data visualization and analysis.
Instructions:
- Open RStudio.
- Copy the code below and paste it into the Console (the bottom-left pane).
- Press Enter.
# List of required packages
pkgs <- c("ggplot2", "gtsummary", "ggrain", "GGally", "patchwork",
"ggExtra", "ggResidpanel", "performance", "see", "ggeffects")
# Install packages
install.packages(pkgs)