
Workshop
A_workshop.Rmd
Installing required packages
must have: RStudio with up to date R
-
Install the “pacman” package which will facilitate the installation of all other required packages:
#install.packages("pacman")
-
Install all the required packages using pacman::p_load() - it should skip any packages that you already have installed.
pacman::p_load(dplyr,forcats,gdistance,ggspatial,magrittr,memoise,methods, nleqslv,purrr,raster,readr,readxl,rlang,sf,sp,stats,stringr, tabularaster,tibble,tidyr,utils,ggplot2,gridExtra,sysfonts)
How to install seabORD
-
unzip folder on computer and know the path to it (e.g.,):
“C:/Users/madtig/Desktop/seabORD_pkg-main”
-
open R Studio (not in the project of the zip file necessarily; just opening R should be enough)
Run the following code in the console with your defined path:
path <- file.path("C:","Users","madtig","Desktop","seabORD_pkg-main", fsep = .Platform$file.sep)
#install.packages(pkgs = path, repos = NULL, type = "source")
- load the package in an R script:
library("seabORD")
- you can now follow the examples!