Getting the workshop materials

R workshop — neotoma2 · Bonn, 26.–27. 8. 2026 · COST PalaeOpen — PalaeoNoma 2026

Author

Petr Kuneš

Published

26 August 2026

Abstract

How to obtain and run the workshop scripts from GitHub. Four routes are described, from the fully equipped setup (RStudio with Git) down to running everything in a browser with nothing installed at all. Do this before arriving in Bonn — installing the packages takes longer than you expect, and the conference wifi will not thank you for forty simultaneous downloads.

1 What you need

Requirement Notes
Essential R, latest version cran.r-project.org
Recommended RStudio Desktop posit.co/download/rstudio-desktop
Optional Git Only for route A. git-scm.com
Essential Internet connection Every script queries the Neotoma API live

Nothing else is needed. There are no data files to download — the scripts fetch everything from the database as they run.

2 The repository

Everything lives in one public repository:

https://github.com/petrkunes/workshop_palaeonoma

The full code handout is published separately at https://rpubs.com/petrkunes/palaeonoma.

3 Route A — RStudio with Git

The recommended route. RStudio clones the repository, creates a project for it, and gives you a Git pane for pulling updates during the workshop.

3.1 Check that Git is available

In RStudio, open Tools ▸ Terminal ▸ New Terminal and type:

git --version

A version number means you are ready. command not found means you need to install Git from git-scm.com, then restart RStudio. If you would rather not install Git at all, use Section 4 instead — the workshop works perfectly well without it.

3.2 Clone the repository

  1. File ▸ New Project…

  2. Version Control ▸ Git

  3. Repository URL:

    https://github.com/petrkunes/workshop_palaeonoma.git
  4. Project directory name: workshop_palaeonoma (filled in automatically)

  5. Choose where to put it — your Documents folder is fine, but avoid a synchronised OneDrive or Dropbox folder, which can lock files while R is using them

  6. Create Project

RStudio downloads the files, opens a new session in that folder, and creates a workshop_palaeonoma.Rproj file for you. The repository itself contains no .Rproj file, so this one is yours alone — it will appear as an untracked file in the Git pane, which is normal and harmless.

3.3 Why the project matters

Opening the .Rproj file sets the working directory to the repository folder. That single fact makes everything else work: source("00_setup.R") finds the file, and any output you write to output/ lands in a predictable place. When you come back tomorrow, open the .Rproj file — not the individual .R files — and you are back where you left off.

4 Route B — RStudio without Git

No Git, no GitHub account, no command line.

  1. Go to https://github.com/petrkunes/workshop_palaeonoma
  2. Click the green Code button ▸ Download ZIP
  3. Unpack it. You will get a folder called workshop_palaeonoma-main — rename it to workshop_palaeonoma if you like
  4. Move it somewhere sensible and permanent, not your Downloads folder
  5. In RStudio: File ▸ New Project… ▸ Existing Directory, choose that folder, Create Project

Step 5 is optional but strongly recommended: it creates the .Rproj file that fixes your working directory, exactly as in route A.

The only thing you lose is the ability to git pull. If a script is corrected during the workshop you will need to download the ZIP again, or just copy the corrected lines from the screen.

5 Route C — no RStudio

R alone is entirely sufficient. RStudio is a convenience, not a requirement.

5.1 Get the files

With Git, in a terminal:

git clone https://github.com/petrkunes/workshop_palaeonoma.git
cd workshop_palaeonoma

Without Git, download and unpack the ZIP as in route B, then cd into the folder.

Note

The README shows the clone and the cd on one line; they are two separate commands, and the folder to enter is workshop_palaeonoma.

5.2 Run the scripts

Start R from inside the repository folder so that the working directory is already correct:

R

Then, at the R prompt:

getwd()                          # should end in /workshop_palaeonoma
source("___Init_project___.R")   # once only, installs everything
source("00_setup.R")             # every session

From there, work through the examples a few lines at a time. Open 01_example1.R in any text editor and paste blocks into the console — that is how R was used for twenty years before RStudio existed.

Do not source() the examples

source("01_example1.R") runs all 58 lines at once and shows you only the final plot. The examples are written to be read and executed step by step. The installation and setup scripts, by contrast, are exactly what source() is for.

5.3 A middle ground

If you want an editor with a live R console but not RStudio specifically, both of these give you send-line-to-console behaviour:

  • Positron — Posit’s newer editor, R and Python (positron.posit.co)
  • VS Code with the R extension by REditorSupport

In either one, open the repository folder as a workspace and the working directory is set for you.

6 Route D — nothing installed at all

If your laptop cannot take R, or an installation goes wrong the night before, you can run the whole workshop in a browser.

  1. Create a free account at posit.cloud
  2. New Project ▸ New Project from Git Repository
  3. Paste https://github.com/petrkunes/workshop_palaeonoma.git
  4. Wait for the workspace to open — it is RStudio, in a browser tab, with the files already cloned
  5. Run source("___Init_project___.R") as usual

Caveats worth knowing: the free tier limits monthly compute hours and gives you 1 GB of RAM, which is enough for these exercises but not generous. Installing the packages in the cloud takes as long as it does locally. And the session sleeps when idle, so save anything you want to keep by downloading it.

7 First run: the order of things

Whichever route you took, the sequence is the same.

7.1 Once, before the workshop

source("___Init_project___.R")

This installs the CRAN packages and then one from GitHub — riojaPlot.

The GitHub installs need build tools

remotes::install_github() compiles from source:

  • Windows — install Rtools, matching your R version
  • macOS — run xcode-select --install in Terminal
  • Linux — you almost certainly have what you need

Without them, the CRAN packages install fine and the two GitHub ones fail quietly. You will only find out in example 2, as there is no package called 'riojaPlot'. Check immediately instead:

# should print TRUE TRUE
c("riojaPlot", "PolEco") %in% rownames(installed.packages())

If riojaPlot failed and you cannot get build tools working, a pre-compiled binary is available:

install.packages("riojaPlot",
                 repos = c("https://nsj3.r-universe.dev",
                           "https://cloud.r-project.org"))

7.2 Every session

Follow Part 1 in Working with Neotoma data in R handouts