-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
233e4fd
commit b496d91
Showing
13 changed files
with
2,706 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
77 changes: 77 additions & 0 deletions
77
analysis/reports/submission2/appendices/graphical_abstract.Rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: "Graphical abstract" | ||
#author: Renata Diaz | ||
date: "`r Sys.Date()`" | ||
output: | ||
github_document: | ||
df_print: kable | ||
toc: true | ||
# word_document: | ||
# df_print: kable | ||
# toc: false | ||
# reference_docx: style_reference.docx | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(echo = FALSE) | ||
library(drake) | ||
library(dplyr) | ||
library(ggplot2) | ||
library(grid) | ||
theme_set(theme_bw()) | ||
library(scadsanalysis) | ||
``` | ||
|
||
|
||
```{r} | ||
# | ||
# mcdb <- load_dataset("mcdb") | ||
# | ||
# set.seed(1977) | ||
# p <- filter(mcdb, site == 1944) | ||
# | ||
# p_samples <- sample_fs_wrapper(p, site_name = 1944, F, 200) | ||
# | ||
# p_di <- add_dis(p_samples) | ||
# | ||
# write.csv(p_di, "portal_di.csv") | ||
# write.csv(p_samples, "portal_samples.csv") | ||
portal_samples <- read.csv("portal_samples.csv") %>% | ||
select(-X) | ||
portal_di <- read.csv("portal_di.csv") %>% | ||
select(-X) | ||
``` | ||
|
||
|
||
```{r, fig.dim = c(2,2)} | ||
portal_samples <- left_join(portal_samples, portal_di) | ||
portal_samples <- portal_samples %>% | ||
mutate(`Simpson's evenness` = simpson) | ||
ga <- ggplot(filter(portal_samples, source == "sampled"), aes(rank, abund, group = sim, color = `Simpson's evenness`)) + | ||
geom_line(alpha = .1) + | ||
geom_line(data = filter(portal_samples, source == "observed"), size = 1.) + scale_color_viridis_c(option = "plasma", end = .8, direction = -1) + | ||
theme(legend.justification = c(0,1.65), legend.position = c(0.01,1)) + | ||
ggtitle("Observed SAD v. statistical baseline") + | ||
ylab("Abundance") + | ||
xlab("Rank") + | ||
theme(axis.text.x = element_blank(), axis.ticks.x = element_blank(), | ||
axis.ticks.y = element_blank(), axis.text.y = element_blank(), | ||
plot.title = element_text(size = 8), panel.grid = element_blank(), | ||
axis.title = element_text(size =7), plot.title.position = "plot", | ||
legend.text = element_blank(), legend.title = element_blank(), legend.direction = "horizontal", legend.key.height = unit(1, units = "mm"), legend.background = element_blank()) + | ||
geom_text(data = NULL, aes(x = 1.8, y = 210, label = "Evenness"), inherit.aes = F, color = "black", alpha = .01, size = 2.5, hjust = 0) + | ||
geom_text(data = NULL, aes(x = 1.8, y = 175, label = "low"), inherit.aes = F, color = "black", alpha = .01, size = 2.5, hjust = 0) + | ||
geom_text(data = NULL, aes(x = 9, y = 175, label = "high"), inherit.aes = F, color = "black", alpha = .01, size = 2.5, hjust = 0) | ||
ga | ||
ggsave("graphical_abstract.pdf", plot = ga, device = "pdf", width = 50, height = 50, units = "mm") | ||
``` | ||
|
||
|
||
While the classic "hollow curve" form of the SAD emerges from randomly dividing individuals between species, observed SADs are consistently much more uneven than the majority of forms that emerge at random. These deviations between observations and the statistical baseline may reflect biological processes shaping the SAD, and provide new leverage for using the SAD to evaluate and refine ecological theory. |
14 changes: 14 additions & 0 deletions
14
analysis/reports/submission2/appendices/graphical_abstract.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Graphical abstract | ||
================ | ||
2021-04-22 | ||
|
||
## Joining, by = c("sim", "source", "dat", "site", "singletons", "s0", "n0", "nparts") | ||
|
||
<!-- --> | ||
|
||
While the classic “hollow curve” form of the SAD emerges from randomly | ||
dividing individuals between species, observed SADs are consistently | ||
much more uneven than the majority of forms that emerge at random. These | ||
deviations between observations and the statistical baseline may reflect | ||
biological processes shaping the SAD, and provide new leverage for using | ||
the SAD to evaluate and refine ecological theory. |
Binary file not shown.
Binary file added
BIN
+20 KB
...ubmission2/appendices/graphical_abstract_files/figure-gfm/unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
2,413 changes: 2,413 additions & 0 deletions
2,413
analysis/reports/submission2/appendices/portal_samples.csv
Large diffs are not rendered by default.
Oops, something went wrong.