-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.qmd
52 lines (35 loc) · 1.79 KB
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Prerequisites {.unnumbered}
This ice-breaking activity to spatial modeling with R includes two case studies:
- Oregon spotted frog habitat study
- A type of cancer spread in Scotland
It is required a good manner of RStudio and a little practice in making plots with {ggplot2}.
To set up install the following packages:
```{r}
#| echo: false
knitr::opts_chunk$set(
include=TRUE,
#eval = FALSE,
fig.align = "center",
message=FALSE,
warning=FALSE,
paged.print=FALSE,
comment = ""
)
```
If these packages are missing in your RStudio they would need to be installed.
Please choose between {OpenStreetMap} and {ggmap}, {OpenStreetMap} has some extra Java requirement and it is not always available for the most updated versions of Mac.
```{r}
#| eval: false
#| include: true
my_packages <- c("tidyverse","ggthemes",
"maptools","OpenStreetMap","ggmap",
"spdep","sf","spocc",
"dismo","SpatialEpi")
install.packages(my_packages, repos = "http://cran.rstudio.com")
install.packages("remotes")
remotes::install_github("fgazzelloni/oregonfrogs")
```
The GitHub repository for this workshop is here: [https://github.com/Fgazzelloni/How-to-Spatial-Modeling-with-R](https://github.com/Fgazzelloni/How-to-Spatial-Modeling-with-R)
Once installed the packages go to the GitHub repo above, You can fork the repository onto your RStudio, or copy and paste the code directly. Another option is to use `{usethis}` and some of its handling functions, for open the project in your machine.
Once set go to the `/data` folder and load the RData in the environment. It will make things easier as you don't need to run some chucks of code which will require some time to compute, and for this reason are set to `eval = false`.
For any questions please email: <[email protected]>