Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bblodfon/rtemps
Rmarkdown + Bookdown templates for Reproducible Data Analyses
https://github.com/bblodfon/rtemps
r r-templates rmarkdown rmarkdown-templates rstudio
Last synced: 22 days ago
JSON representation
Rmarkdown + Bookdown templates for Reproducible Data Analyses
- Host: GitHub
- URL: https://github.com/bblodfon/rtemps
- Owner: bblodfon
- License: other
- Created: 2020-02-17T10:43:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-08T08:53:16.000Z (over 2 years ago)
- Last Synced: 2024-09-23T01:49:14.782Z (about 2 months ago)
- Topics: r, r-templates, rmarkdown, rmarkdown-templates, rstudio
- Language: HTML
- Homepage:
- Size: 8.13 MB
- Stars: 32
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rtemps
[![R build status](https://github.com/bblodfon/rtemps/workflows/R-CMD-check/badge.svg)](https://github.com/bblodfon/rtemps/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/rtemps)](https://cran.r-project.org/package=rtemps)
[![Downloads](https://cranlogs.r-pkg.org/badges/rtemps)](https://cran.r-project.org/package=rtemps)My personal favourite `R` templates for doing reproducible data analyses.
## Citation
If you want to acknowledge this work, cite it as:
Zobolas, J. (2020). Rtemps: R Templates for Reproducible Data Analyses. GitHub Repository. Retrieved from https://github.com/bblodfon/rtemps
BibTeX citation:
```
@misc{rtemps,
author = {Zobolas, John},
booktitle = {GitHub repository},
publisher = {GitHub},
title = {{Rtemps: R Templates for Reproducible Data Analyses}},
url = {https://github.com/bblodfon/rtemps},
year = {2020}
}
```## Available Themes
- [United HTML Document](https://bblodfon.github.io/rtemps/united-html/united-html.html): a [bootstrap](https://bootswatch.com/united/)-based single [R Markdown](https://bookdown.org/yihui/rmarkdown/) document
![](img/united.gif)
- [Bookdown Lite](https://bblodfon.github.io/rtemps/bookdown-lite/docs/bookdown-lite.html): a single-paged [bookdown-based](https://bookdown.org/yihui/bookdown) document
![](img/bookdown_lite.gif)
## Install
From CRAN:
```r
install.packages("rtemps")
```Note that the package imports among others the libraries [DT](https://rstudio.github.io/DT/), [ggplot2](https://github.com/tidyverse/ggplot2) and [xfun](https://github.com/yihui/xfun).
## Usage
Once the templates are installed, you can use them in 2 ways:
1. Within the templates in **RStudio** (highly advised - easiest way):
- `File` > `New File` > `R Markdown...` > `From Template` (United HTML Theme)
- `File` > `New Project...` > `New Directory` > `Bookdown Lite project` (Bookdown Lite Theme)
2. By calling the `create_rtemp()` function which allows you to create a new directory with all the template files inside, ready to be used/rendered.## Notes
### United HTML Theme
- To create and render the template from an R session, run:
```r
rtemps::create_rtemp(dirname = "new-dir", template = "united_html")
rmarkdown::render(input = "new-dir/index.Rmd", output_format = "html_document", output_dir = "new-dir")
```### Bookdown Lite Theme
- To create and render the template from the command line, run:
```bash
Rscript -e "rtemps::create_rtemp(dirname = 'new-dir', template = 'bookdown_lite')"
cd new-dir
./_build.sh
```- The output of the *Bookdown Lite* theme is placed under a `docs` directory, so that it can easily be rendered with [GitHub Pages](https://help.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
- The *Bookdown Lite* can be easily converted to a **multi-paged document** by configuring the `split_by` property in the `_output.yml` template file ([check the doc](https://bookdown.org/yihui/bookdown/html.html#gitbook-style)).