A computationally reproducible manuscript for the Draft manucript [Davidson et al. 2020].
Mouse populations were not affected by stoat control during any of the four seasonal seasons of New Zealand beech forests.
Outcomes from predictions A-D did not change when rat populations were manually reduced to lower densities.
📦publication-repository
┣ 📂data
...
┣ 📂docs
...
┣ 📂figs
...
┣ 📂rmd
┣ 00-Cover-letter.Rmd
┣ 01-introduction.Rmd
┣ 03-Material-and-methods.Rmd
┣ 04-Results.Rmd
┣ 05-Discussion.Rmd
┣ 07-references.Rmd
┣ 📂vignettes
...
┣ 📂_references
┣ Beech-forests.bib
...
```
### Data folder `/data/`
┣ 📂data ...
### Vignettes folder `/vignettes/`
These files are additonal information and resources to help with understanding the analysis done in this publication. At them moment this folder is just a dumping ground for bits of information that were to lengthly for publication.
> Bits of appendix can probably go into here too?
┣ 📂vignettes ┣ 00-Cover-letter.Rmd ┣ 00-wr-summary.Rmd
### Libraries used
require(tidyverse)
require(kableExtra) require(extrafont)
windowsFonts() loadfonts(device = "win")
windowsFonts(Times = windowsFont("TT Times New Roman"))
knitr::write_bib(c(.packages(), 'bookdown', 'knitr', 'rmarkdown','tidyverse', "compareGroups", "jagsUI" ), 'packages.bib') require("dplyr") require("knitr") require("docxtools") require("citr")
knitr::opts_chunk$set(comment=NA, # fig.path = "../figs/", echo=FALSE, fig.height=5, fig.width=7, message=FALSE, warning=FALSE, tidy = TRUE # , cache.extra = packageVersion('tufte') )
source("./R/theme_raw_fig3s.r", echo = FALSE) source("./R/davidson_2019_theme.r", echo = FALSE)
require(extrafont)
windowsFonts() loadfonts(device = "win")
windowsFonts(Times = windowsFont("TT Times New Roman"))
knitr::write_bib(c(.packages(), 'bookdown', 'knitr', 'rmarkdown','tidyverse', "compareGroups", "jagsUI" ), 'packages.bib')
## Folder layout
📦publication-repository ┣ 📂data ... ┣ 📂docs ... ┣ 📂figs ... ┣ 📂rmd ┣ 00-Cover-letter.Rmd ┣ 01-introduction.Rmd ┣ 03-Material-and-methods.Rmd ┣ 04-Results.Rmd ┣ 05-Discussion.Rmd ┣ 07-references.Rmd ┣ 📂vignettes ... ┣ 📂_references ┣ Beech-forests.bib ...
```
/data/
┣ 📂data
...
/vignettes/
These files are additonal information and resources to help with understanding the analysis done in this publication. At them moment this folder is just a dumping ground for bits of information that were to lengthly for publication.
Bits of appendix can probably go into here too?
┣ 📂vignettes
┣ 00-Cover-letter.Rmd
┣ 00-wr-summary.Rmd
```
### Libraries used
require(tidyverse)
require(kableExtra) require(extrafont)
windowsFonts() loadfonts(device = "win")
windowsFonts(Times = windowsFont("TT Times New Roman"))
knitr::write_bib(c(.packages(), 'bookdown', 'knitr', 'rmarkdown','tidyverse', "compareGroups", "jagsUI" ), 'packages.bib') require("dplyr") require("knitr") require("docxtools") require("citr")
knitr::opts_chunk$set(comment=NA, # fig.path = "../figs/", echo=FALSE, fig.height=5, fig.width=7, message=FALSE, warning=FALSE, tidy = TRUE # , cache.extra = packageVersion('tufte') )
source("./R/theme_raw_fig3s.r", echo = FALSE) source("./R/davidson_2019_theme.r", echo = FALSE)
require(extrafont)
windowsFonts() loadfonts(device = "win")
windowsFonts(Times = windowsFont("TT Times New Roman"))
knitr::write_bib(c(.packages(), 'bookdown', 'knitr', 'rmarkdown','tidyverse', "compareGroups", "jagsUI" ), 'packages.bib')
## Contents
*page here*
┣ 📂vignettes ┃ ┣ 📜00-Cover-letter.Rmd ┃ ┣ 📜00-wr-summary.Rmd ```
coming
An overview of the project files.
Manuscript introduction.
Manuscript methods using Bayesian Models.
wildlife research
journal.The aim of this bookdown project is to provide a working archive of code, data and manuscripts submitting in my research.
I have build this manuscript using a combination of computational methods in Ecology. In short I have compiled this book using bookdown
. Here is the minimal example of a book based on R Markdown and bookdown (https://github.com/rstudio/bookdown).
Check out the website for more resources and my working notes here.
[This must be done before reproducible step below if build does not work on your local machine].
make.R
requires various packages to be installed, and may not work properly if package versions have changed.
A [Docker image is need] to run the code reproducibly. An example would be the paper I have based this structure on here.
To use it, first install docker and clone this repository.
Navigate to the cloned repository (where /path/to/repo
is the path on your machine), and launch the container:
cd /path/to/repo
docker-compose up -d
Enter the container:
docker exec -it pleurosoriopsis_analysis_1 bash
Inside the container, run make.R
:
Rscript make.R
You will see the targets being built by drake
, and the final manuscript should be compiled at the end as ms.pdf
.
When it's finished, exit the container and take it down:
exit
docker-compose down
#STandard jekyll website file structure
.
├── _config.yml
├── _data
| └── members.yml
├── _drafts
| ├── begin-with-the-crazy-ideas.md
| └── on-simplicity-in-technology.md
├── _includes
| ├── footer.html
| └── header.html
├── _layouts
| ├── default.html
| └── post.html
├── _posts
| ├── 2007-10-29-why-every-programmer-should-play-nethack.md
| └── 2009-04-26-barcamp-boston-4-roundup.md
├── _sass
| ├── _base.scss
| └── _layout.scss
├── _site
├── .jekyll-metadata
└── index.html # can also be an 'index.md' with valid front matter
All code can be found in R. The drake package is used to manage the workflow. To run all analyses and generate the manuscript, simply clone this git repository and run make.R
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.