Skip to content

Commit 5ecd0c3

Browse files
committed
Update datasets in examples and tests
1 parent 1e8f2a4 commit 5ecd0c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+9790
-8197
lines changed

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ Suggests:
6565
folio,
6666
khroma,
6767
knitr,
68-
magrittr,
6968
rmarkdown,
7069
testthat (>= 3.0.0),
7170
vdiffr (>= 1.0.0)

README.Rmd

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ remotes::install_github("tesselle/tabula")
6464
## Load packages
6565
library(folio) # Datasets
6666
library(khroma) # Color scales
67-
library(magrittr) # Pipes
6867
library(ggplot2)
6968
7069
library(tabula)
@@ -116,14 +115,14 @@ Measure diversity by comparing to simulated assemblages:
116115
set.seed(12345)
117116
118117
## Data from Conkey 1980, Kintigh 1989, p. 28
119-
chevelon %>%
120-
heterogeneity(method = "shannon") %>%
121-
simulate() %>%
118+
chevelon |>
119+
heterogeneity(method = "shannon") |>
120+
simulate() |>
122121
plot()
123122
124-
chevelon %>%
125-
richness(method = "count") %>%
126-
simulate() %>%
123+
chevelon |>
124+
richness(method = "count") |>
125+
simulate() |>
127126
plot()
128127
```
129128

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ remotes::install_github("tesselle/tabula")
9292
## Load packages
9393
library(folio) # Datasets
9494
library(khroma) # Color scales
95-
library(magrittr) # Pipes
9695
library(ggplot2)
9796

9897
library(tabula)
@@ -163,14 +162,14 @@ Measure diversity by comparing to simulated assemblages:
163162
set.seed(12345)
164163

165164
## Data from Conkey 1980, Kintigh 1989, p. 28
166-
chevelon %>%
167-
heterogeneity(method = "shannon") %>%
168-
simulate() %>%
165+
chevelon |>
166+
heterogeneity(method = "shannon") |>
167+
simulate() |>
169168
plot()
170169

171-
chevelon %>%
172-
richness(method = "count") %>%
173-
simulate() %>%
170+
chevelon |>
171+
richness(method = "count") |>
172+
simulate() |>
174173
plot()
175174
```
176175

codemeta.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,6 @@
125125
},
126126
"sameAs": "https://CRAN.R-project.org/package=knitr"
127127
},
128-
{
129-
"@type": "SoftwareApplication",
130-
"identifier": "magrittr",
131-
"name": "magrittr",
132-
"provider": {
133-
"@id": "https://cran.r-project.org",
134-
"@type": "Organization",
135-
"name": "Comprehensive R Archive Network (CRAN)",
136-
"url": "https://cran.r-project.org"
137-
},
138-
"sameAs": "https://CRAN.R-project.org/package=magrittr"
139-
},
140128
{
141129
"@type": "SoftwareApplication",
142130
"identifier": "rmarkdown",
@@ -262,7 +250,7 @@
262250
},
263251
"SystemRequirements": null
264252
},
265-
"fileSize": "1644.741KB",
253+
"fileSize": "1888.796KB",
266254
"citation": [
267255
{
268256
"@type": "ScholarlyArticle",

inst/examples/ex-diversity.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
## Ceramic data
2-
data("chevelon", package = "folio")
1+
data("cantabria")
32

43
## Shannon diversity index
5-
(h <- heterogeneity(chevelon, method = "shannon"))
6-
(e <- evenness(chevelon, method = "shannon"))
4+
(h <- heterogeneity(cantabria, method = "shannon"))
5+
(e <- evenness(cantabria, method = "shannon"))
76

87
## Bootstrap resampling (summary statistics)
98
bootstrap(h, f = NULL)

inst/examples/ex-independance.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
## Ceramic data
2-
data("compiegne", package = "folio")
1+
data("cantabria")
32

43
## Compute EPPM
5-
counts_eppm <- eppm(compiegne)
4+
counts_eppm <- eppm(cantabria)
65
plot_heatmap(counts_eppm) +
76
khroma::scale_fill_YlOrBr(name = "EPPM")
87

98
## Compute PVI
10-
counts_pvi <- pvi(compiegne)
9+
counts_pvi <- pvi(cantabria)
1110
plot_heatmap(counts_pvi) +
1211
khroma::scale_fill_BuRd(name = "PVI", midpoint = 1)

inst/examples/ex-occurrence.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
## Ceramic data
2-
data("mississippi", package = "folio")
1+
data("cantabria")
32

43
## Plot spot diagram of a co-occurrence matrix
5-
occ <- occurrence(mississippi)
4+
occ <- occurrence(cantabria)
65
plot_spot(occ)

inst/examples/ex-plot_diversity.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
\donttest{
2-
## Ceramic data
3-
data("chevelon", package = "folio")
2+
data("cantabria")
43

54
## Assemblage diversity size comparison
65
## Warning: this may take a few seconds!
7-
h <- heterogeneity(chevelon, method = "shannon")
6+
h <- heterogeneity(cantabria, method = "shannon")
87
h_sim <- simulate(h)
98
plot(h_sim)
109

11-
r <- richness(chevelon, method = "count")
10+
r <- richness(cantabria, method = "count")
1211
r_sim <- simulate(r)
1312
plot(r_sim)
1413
}

inst/examples/ex-plot_matrix.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
## Ceramic data
2-
data("compiegne", package = "folio")
1+
data("cantabria")
32

43
## Plot matrix diagram...
5-
plot_heatmap(compiegne)
6-
plot_heatmap(compiegne, freq = TRUE)
4+
plot_heatmap(cantabria)
5+
plot_heatmap(cantabria, freq = TRUE)
76

87
## Presence/absence data
98
inc <- sample(0:1, size = 100, replace = TRUE)

inst/examples/ex-plot_rank.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
## Ceramic data
2-
data("compiegne", package = "folio")
1+
data("cantabria")
32

43
## Plot rank vs abundance
5-
plot_rank(compiegne)
6-
plot_rank(compiegne, facet = TRUE)
4+
plot_rank(cantabria)
5+
plot_rank(cantabria, facet = TRUE)

inst/examples/ex-plot_spot.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
## Ceramic data
2-
data("mississippi", package = "folio")
1+
data("cantabria")
32

43
## Plot spot diagram of count data...
54
### ...without threshod
6-
plot_spot(mississippi)
5+
plot_spot(cantabria)
76
### ...with the column means as threshold
8-
plot_spot(mississippi, threshold = mean)
7+
plot_spot(cantabria, threshold = mean)
98
### ...with the column medians as threshold
10-
plot_spot(mississippi, threshold = median)
9+
plot_spot(cantabria, threshold = median)

inst/examples/ex-rarefaction.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
## Engraved Bones data
2-
data("cantabria", package = "folio")
1+
data("cantabria")
32

43
## Replicate fig. 3 from Baxter 2011
54
rare <- rarefaction(cantabria, sample = 23, method = "baxter")

inst/examples/ex-test.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
## Ceramic data
2-
data("merzbach", package = "folio")
1+
data("cantabria")
32

43
## Shannon diversity test
5-
test_diversity(merzbach)
4+
test_diversity(cantabria)

man/heterogeneity.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/independance.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/occurrence.Rd

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_diversity.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_heatmap.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_line.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_spot.Rd

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/rarefaction.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/reexports.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/simulate.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/test_diversity.Rd

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)