2.1 Getting RStudio to run on your computer

As a prerequisite for this guide, you need to have RStudio and a few essential R packages installed.

You have to follow these steps to get your RStudio set.

  1. Download RStudio on the RStudio Website (Link). It’s free!
  2. If you do not have R installed yet, you will have to install the latest R Version before you can use RStudio. You can get the latest R version here.
  3. Once RStudio is running, open the Console on the bottom left corner of your screen.
  4. We will now install a few packages using R Code. Here’s an overview of the packages, and why we need them:
Package Description
tidyverse This is a large package containing various functions to tidy up your data
metaforest This package is used to explore heterogeneity using the random forests algorithm. It also installs the R-package ‘metafor’, which is one of the most commonly used meta-analysis packages.
caret This package is an all-purpose machine learning interface, which we will use for model tuning in the chapter on MetaForest.



5. To install these packages, we use the install.packages() function in R. One package after another, our code should look like this:

install.packages("tidyverse")
install.packages("meta")
# To install the 'metaforest' package, we use the development version,
# which contains some functions for this course.
# First, install the 'devtools' package, which allows you to install packages
# directly from github
install.packages("devtools")
# Load the devtools package
library(devtools)
# Install metaforest from github:
install_github("cjvanlissa/metaforest")

Don’t forget to put the packages in "".

Otherwise, you will get an error message.