Setup

What to install before the course, and how to check it

Everyone taking the course works in R, inside an IDE, with a ready-made workspace that you download once. An IDE (an integrated development environment, such as Positron, RStudio or VS Code) is the program in which you open files, write and run code and read results. R is the language that does the calculation, and the two are installed separately. The default IDE for the course is Positron, because Positron is one of the data-science tools that the course teaches, and it is the IDE that the facilitator uses on the shared screen. If you already work in RStudio or in VS Code you can stay there: every task runs in all three, and the IDE module of the companion curriculum sets the three side by side.

The Browser lab runs the same exercise on the same data inside a browser tab. It is there for following a demonstration on a shared screen, for trying things before you have installed anything, and as a fallback if your machine fails on the day. The course itself takes place in the downloaded workspace.

Windows and Linux installations are supported in class. macOS installations are not, because the facilitator does not use a Mac and cannot test one. The Mac steps below follow the official documentation and link to it, and a Mac user who gets stuck should work from those links or from the help page, since no in-class assistance is available for a Mac.


1. R

R is the language in which the analysis is written. Positron requires R 4.2 or later, and the check script for the course expects a current release. Download R from cran.r-project.org and use the installer for your system.

Download the installer from the CRAN Windows page and run it. Accept the defaults, with one exception: keep the box “Save version number in registry” ticked, because RStudio, Positron and the VS Code R extension all use the registry entry to find R. Rtools, the toolchain for compiling packages from source, is not needed for the course, because every package that the course uses installs as a pre-built binary.

The CRAN macOS page offers two builds of the current release, and you need the one that matches your machine: the Apple silicon (arm64) package for an M-series Mac, which requires macOS 14 or later, and the Intel (x86_64) package for an Intel Mac, which requires macOS 11 or later. Open the .pkg and follow the installer. If macOS refuses the installer access to your Downloads folder, move the file to your home folder and run it from there, as the CRAN page advises. XQuartz is only needed for the X11 graphics device, which the course does not use. The R for macOS FAQ is the reference for anything that the installer does not settle, and the R-SIG-Mac list is where Mac-specific problems are discussed.

Install R from the packages of your distribution or from the repositories maintained by CRAN, which are more current: the Ubuntu, Debian and Fedora and Red Hat pages give the repository lines to add. On Linux, packages are usually compiled from source when they are installed, so the build tools and the development headers for libcurl, libssl and libxml2 should be present. The CRAN pages for each distribution list the package names.

Whichever system you are on, open a terminal afterwards and type R --version. If a version line comes back, R is installed and on your path, which is what every IDE below relies on.


2. Quarto

Quarto is the tool that turns your report, a .qmd file holding code and prose, into a finished document, and rendering the report is how your preregistration block gets its timestamp on the day. Whether you need to install it depends on the IDE:

  • RStudio comes with a copy of Quarto inside it, so nothing more is needed to render; installing Quarto separately from quarto.org gets you a newer version than the bundled one, which is worth doing but not required.
  • Positron ships with the Quarto extension, which gives it the render and preview commands. Whether the Quarto command-line tool itself comes with a given Positron build has changed between versions, so the check script for the course (step 5 below) tells you whether it is present. If it is not, install it from quarto.org.
  • VS Code needs both the Quarto extension and the Quarto command-line tool, which you install from quarto.org.

To confirm an installation, open a fresh terminal and type quarto --version.


3. The IDE

Pick one. The default for the course is Positron, and the other two are fully supported for every task.

Positron is a data-science IDE from Posit, built on the same open-source foundation as VS Code and free to use. Download it from positron.posit.co/download.

  • Windows 10 or later on x64, and Windows 11 on ARM64; the installer comes in a per-user and a system-wide version, and Positron asks for the latest Visual C++ Redistributable, which the installer points you to if it is missing.
  • macOS 11 or later, with separate downloads for Apple silicon and Intel machines. Open the .dmg and drag Positron to Applications.
  • Linux with .deb packages for Ubuntu 20 and later and Debian, and .rpm packages for Red Hat 9 and Fedora, on x64 and ARM64.

When Positron first opens it finds the R you installed in step 1 on its own, looking in the standard locations for your system and, on Windows, in the registry entry that the R installer wrote. Its welcome page shows an environment card that checks whether R is ready and offers to fix what it finds. The Quarto extension and R language support are built in, so there is nothing to add. If you are coming from RStudio, open the settings, search for “RStudio keybindings”, tick the box and restart Positron, so that the keyboard shortcuts you know carry over.

RStudio is the IDE that most R users learned on, and if it is already on your machine you can use it as it is. Install R first, then download RStudio Desktop from posit.co. In September 2026 the current release is 2026.09. It runs on Windows 11, on macOS 14 or later, and on Ubuntu 22 and later, Debian 13, Red Hat 9 and 10 and Fedora, as an .exe, a .dmg or a .deb and .rpm package. RStudio finds R on its own and includes a copy of Quarto, so steps 1 and 3 are all it needs. Open the workspace as a project (step 4).

VS Code is the general-purpose editor on which Positron is built, and it works for R once two extensions and one R package are in place. Download it from code.visualstudio.com. Then, inside VS Code, install the R extension (REditorSupport.r) and the Quarto extension (quarto.quarto) from the Extensions view. In R, install the package that gives the editor its code completion and diagnostics: install.packages("languageserver"). On Windows the R extension finds R through the registry entry from step 1, and on any system you can point it at an R executable in the settings of the extension (r.rpath.windows, r.rpath.mac, r.rpath.linux). Two optional extras, the radian console and the httpgd package for the plot viewer, are described in the VS Code R documentation. The Quarto command-line tool is installed separately (step 2).


4. The workspace

Download the workspace as a single zip file:

Download the workspace (zip)

Save it somewhere you will find again, such as your Desktop or Documents folder, then unzip it. You now have a folder containing the analysis code, the data and a report to fill in. There is no account to create and nothing to sign into.

Open the folder in your IDE. In Positron and in VS Code, choose File → Open Folder and pick the unzipped folder; the files appear in a panel on the left. In RStudio, open the file replication-lab.Rproj inside the folder, which opens it as a project with the working directory set. Everything you need for the day is in this one folder, and it is yours to keep afterwards.


5. Check that it works

In the folder, open R/check_setup.R and run it: click Run or Source in your IDE, or type source("R/check_setup.R") in the R console. The script prints a short OK or FAIL report covering your R version, Quarto, the packages that the course uses and access to the data. If any package is missing, the report prints a line of R that installs all the missing packages at once, so run that line and then run the script again. Quarto cannot be installed from R in this way. If the report says that Quarto is not found, install it (step 2) and run the script again in a fresh session. Fix any FAIL before the day.

Note

The course uses a set of standard R packages, for tidying data, fitting models, drawing causal graphs and making tables. You do not need to look them up one by one, because the check script prints the line that installs whichever are missing. All are free and come from CRAN, the official package archive for R.

If something fails and the report does not say why, the help page lists the problems that other participants have met, with their fixes and with prompts you can give an AI assistant. If you get stuck, come along anyway and use the browser lab.


6. The Eurobarometer files, for the individual-level work

Everything on the day runs on the country-year panel that comes with the workspace, so this step is needed only if your track includes the individual-level extension, or if you want to rebuild the panel yourself. The respondent-level data behind the course are sixteen Eurobarometer surveys distributed by the GESIS archive under terms that do not allow the course to pass them on, so each participant downloads them under their own free account. Do it in the week before the course, because registration is a web form with a captcha and the sixteen files come to about half a gigabyte.

  1. Register with GESIS at search.gesis.org. Registration is free, open to all and immediate.
  2. Download the Stata file of each of the sixteen studies listed in the data sources module, which has the study numbers, the versions current at the time of writing, and a screenshot of every step. Search by study number, take the .dta file only, and state your purpose of use in the download dialog as “in the course of my studies” or “for further education and qualification”.
  3. Put all sixteen in one folder outside the workspace, for instance Documents/eurobarometer_raw. Two of them arrive as .zip archives; leave them as they are.
  4. Run prep/01_build_respondents.R from the workspace, after setting the folder path at the top of the script. It checks every file against the version from which the course was built, reads the sixteen, and writes one respondent-level file into data_private/, a folder that the workspace keeps out of version control. The data management module walks through what the script does and takes the next step, from the items to the scales and the panel.

The GESIS terms of use forbid passing the files to anyone else, publishing anything about individual respondents, and processing the files with an AI assistant. Keep the folder to yourself, keep the respondent file out of any repository, and do not open it in a session that an assistant can read.


The browser lab

The Browser lab page holds the whole exercise on a copy of R that runs inside the browser.

  • Nothing to install. A recent version of Chrome, Edge or Firefox is all you need. (Safari works too, but the others are more reliable for this.)
  • The one link. Open the page and a full copy of R starts up inside the tab – it takes ten to thirty seconds the first time – with the data already in place, the same helpers as the workspace, and the same numbers at the end.
  • What it is for. Following a demonstration on the shared screen, trying the exercise before you have installed anything, and carrying on if your own installation fails on the day. Work done in it stays in the tab only until you refresh, so anything you want to keep should go into your workspace.

Open it once in advance to confirm that it loads on the machine you will use.


What you do not need

The day needs no accounts or sign-ups. In particular, you do not need:

  • git or a GitHub account – nothing in the day depends on version control. If you want to learn it, the optional Git and GitHub companion module is there for afterwards.
  • an OSF account – you will see how preregistration works on the Open Science Framework and complete one yourself, in the preregistration block of your own report.
  • an AI assistant account – Posit Assistant in Positron and the assistants in VS Code need a provider account or an API key of your own, and nothing in the course depends on either. The help page says how to use one for setup problems if you have one.
  • paid software – everything used is free and open.
  • any sign-up at all – you can arrive, take part in full and leave without creating a single account.

Two screens

When the workshop runs online, you will get the most out of it with a little room to work:

  • A second window or device. Join the video call on one screen (or one device), and keep a second window or a second device free for your own work – your IDE, or the browser lab if your machine fails on the day. That way you can follow the shared screen and do the hands-on tasks side by side, without one covering the other.
  • Joining links. The call link, and any session-specific links, come to you with the joining details. You do not need to hunt for anything in advance beyond the setup on this page.

Optional reading

None of these is required, and everything is taught on the day. If you would like to arrive with some context, these are worth the time, with one line each on why.

Reading Why it is worth the time
Nosek et al. (2018) – The preregistration revolution A short, readable primer on the one idea on which preregistration depends: the difference between predicting a result and explaining one after the fact. It deals directly with the case where the data already exist, which is ours.
The AsPredicted eight-question form The template you will fill in during the session. Skim the eight questions once so that the form is familiar when you meet it on the day.
van den Akker et al. (2021) – Preregistration of secondary data analysis The fuller preregistration template, built for our situation of reanalysing data that already exist. It is optional, but it is the more thorough tool for the job you do on the day.
Reading a specification curve The course reading for the final part of the day: what a large set of results together can and cannot establish, and why thousands of estimates do not amount to thousands of independent tests.
The IDE module Positron, RStudio and VS Code set side by side: what each pane does, what changes between them, and what is new in the current releases.