As this is the very first exercise in this workshop, it is relatively easy and short. Its purpose is to get used to this exercise format and, more importantly, to install all necessary packages for this course.
Note: You can find the solutions for this exercise and all other exercises in the solutions folder in the repo/directory that contains the course materials. You can copy code from these exercise files by clicking on the small blue clipboard icon in the code boxes’ upper right corner.
And here comes our very first exercise (which is not very spatial…):
easypackages packages, which can be installed with the command install.packages("easypackages"). After loading the package with library(easypackages) you can load and install packages with the command easypackages::packages("fancy_package_1", "fancy_package_2", ...). You can also install Github packages just by adding the Github user’s name in front of the package name, e.g., DavidHasselhof/fancy_package_3.
easypackages::packages(
"dplyr",
"ggplot2",
"ggsn",
"haven",
"maptools",
"osmdata",
"OpenStreetMap",
"reticulate",
"sf",
"spatstat",
"stars",
"tmap",
"tmaptools",
"raster",
"StefanJuenger/z11"
)
## Loading required package: dplyr
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## Loading required package: ggplot2
## Loading required package: ggsn
## Loading required package: grid
## Loading required package: haven
## Loading required package: maptools
## Loading required package: sp
## Checking rgeos availability: TRUE
## Loading required package: osmdata
## Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright
## Loading required package: OpenStreetMap
## Loading required package: reticulate
## Loading required package: sf
## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
## Loading required package: spatstat
## Loading required package: spatstat.data
## Loading required package: nlme
##
## Attaching package: 'nlme'
## The following object is masked from 'package:dplyr':
##
## collapse
## Loading required package: rpart
## Registered S3 method overwritten by 'spatstat':
## method from
## print.boxx cli
##
## spatstat 1.64-1 (nickname: 'Help you I can, yes!')
## For an introduction to spatstat, type 'beginner'
##
## Note: spatstat version 1.64-1 is out of date by more than 9 months; we recommend upgrading to the latest version.
## Loading required package: stars
## Loading required package: abind
## Loading required package: tmap
## Loading required package: tmaptools
## Loading required package: raster
##
## Attaching package: 'raster'
## The following objects are masked from 'package:spatstat':
##
## area, rotate, shift
## The following object is masked from 'package:nlme':
##
## getData
## The following object is masked from 'package:ggsn':
##
## scalebar
## The following object is masked from 'package:dplyr':
##
## select
## Loading required package: z11
## All packages loaded successfully
That’s it. Please notify us if there are any issues with installing the packages or, more generally, your R installation.