forked from datacarpentry/R-ecology-lesson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.R
30 lines (26 loc) · 981 Bytes
/
setup.R
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
## file structure
if (! file.exists("data")) dir.create("data")
if (!file.exists("data/surveys.csv")) {
download.file("https://ndownloader.figshare.com/files/2292172",
"data/surveys.csv")
}
if (!file.exists("data/species.csv")) {
download.file("https://ndownloader.figshare.com/files/3299483",
"data/species.csv")
}
if (!file.exists("data/plots.csv")) {
download.file("https://ndownloader.figshare.com/files/3299474",
"data/plots.csv")
}
if (!file.exists("data/portal_data_joined.csv")) {
download.file("https://ndownloader.figshare.com/files/2292169",
"data/portal_data_joined.csv")
}
if (!file.exists("data/portal_mammals.sqlite")) {
download.file("https://ndownloader.figshare.com/files/2292171",
"data/portal_mammals.sqlite")
}
## knitr options
library(knitr)
knitr::opts_chunk$set(results='hide', fig.path='img/R-ecology-',
comment = "#>")