knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" ) # load development package devtools::load_all(getwd()) pkgenv <- export_pkgenv()
This repository contains a reproducible research compendium for our r pkgenv$product
:
r pkgenv$authors
(r pkgenv$year
).r pkgenv$title
.r pkgenv$journal
.r pkgenv$doi_published
Please cite this compendium as:
r pkgenv$authors
, (r format(Sys.Date(), "%Y")
). Compendium of R code and data for 'r pkgenv$title
'. Accessedr format(Sys.Date(), "%d %b %Y")
. Online atr pkgenv$doi_osf
The compendium contains all data, code, and text associated with the r pkgenv$product
. It is organized as follows:
R/
directory contains all the R code.inst/analysis_dir/analysis/
directory contains 4 subfolders with the following contentsdata/
: the raw datafigures/
: the figures used in the manuscriptmanuscript/
: the manuscript as accepted by the journaltemplates/
: the Microsoft word template used to prepare the manuscriptThere are several ways to use the compendium's contents and reproduce the analysis:
Download the compendium as a zip archive from this GitHub repository or a registered/frozen version from the associated OSF project (click on "GitHub: ...", then select "Download as zip").
Install the compendium as an R package from GitHub using the devtools
package:
install.packages("devtools")
devtools::install_github("`r pkgenv$url_github`")
Reproduce the analysis locally inside a Docker container. This allows to replicate the exact computational environment used by the authors. The compendium includes a Dockerfile that specifies how to build a Docker image that contains all the software dependencies needed to run the code and also includes the compendium's R package, ready to use. After installing Docker (needs administrator privileges), one can simply download the image and run the container using:
docker run -p 8888:8888 `r pkgenv$url_docker`
Reproduce the analysis in the cloud without having to install any software. The same Docker container replicating the computational environment used by the authors can be run using BinderHub on mybinder.org:
Text and figures : CC-BY-4.0
Code : See the DESCRIPTION file
Data : CC-0 attribution requested in reuse
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.