1  Setup

To get started, ensure you have a recent version or R and RStudio installed.

1.1 Software

1.1.1 Install R

To install R head to https://cran.rstudio.com/.

1.1.2 Install RStudio

Next, install RStudio Desktop IDE at https://posit.co/download/rstudio-desktop/.

1.1.3 Packages

To install the required packages, run:

install.packages("tidyverse")
install.packages("mgcv")
install.packages("pins")
install.packages("vetiver")
install.packages("plumber")
install.packages("here")
install.packages("roxygen2")
install.packages("testthat")

You should be able to now run the following commands:

library(tidyverse)
library(mgcv)
library(pins)
library(vetiver)
library(plumber)
library(here)
library(roxygen2)
library(testthat)

1.2 Code

1.2.1 Download from Github

Materials for the case study can be cloned by using the following command from the usethis package:

usethis::create_from_github("deanmarchiori/beachwatch", fork = FALSE)

Alternatively visit: https://github.com/deanmarchiori/beachwatch to download the code as a zip file.