Pre-workshop instructions for participants. Let’s get ready to rock! 🚀

R and RStudio 💻

R is a fantastic software for statistical analyses. 📊 RStudio is your trusty sidekick, helping you navigate the R universe with ease. It’s like a cozy integrated development environment (IDE) for R. 🌟

There are plenty of guides available to help you obtain or update R and RStudio. Here are a couple of them to get you started:

Packages 📦

Packages are like magic toolboxes 🧰 that contain a collection of functions for specific needs. We want to make sure that everyone has the necessary packages installed for this workshop.

Install packages

Let’s create a list of packages that we’ll need from CRAN. Here they are:

package_list <-
  c(
    "tidyverse", # general data wrangling and visualisation ✨
    "pander", # nice tables 😍
    "Bchron", # age-depth modelling 🕰️
    "janitor", # string cleaning 🧹
    "remotes", # installing packages from GitHub 🚀
    "neotoma2", # access to the Neotoma database 🌿
    "here" # for working directory 🗺️
  )

Now, let’s install all these amazing packages from CRAN:

lapply(
  package_list, utils::install.packages
)

Install the RRatepol package 🌼

The {RRatepol} is an R package for estimating rate of change (RoC) from community data in time series. Take a peek at its website for more information.

Let’s try installing the package from GitHub:

# Install R-Ratepol
remotes::install_github("HOPE-UIB-BIO/R-Ratepol-package")

Test if everything is set up ✅

Let’s do a quick test to make sure everything is in order. Running the following code should produce "Everything is good to go" instead of an error message saying "All required packages are not installed".

if (
  isTRUE(
    all(
      c(package_list, "RRatepol") %in%
        as.data.frame(
          utils::installed.packages()
        )[, 1]
    )
  )
) {
  cat("Everything is good to go")
} else {
  warning("All required packages are not installed")
}