Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bdcaf/cookiecutter-r-data-analysis
cookie cutter template for my r workflow
https://github.com/bdcaf/cookiecutter-r-data-analysis
cookiecutter makefile r workflow
Last synced: 3 months ago
JSON representation
cookie cutter template for my r workflow
- Host: GitHub
- URL: https://github.com/bdcaf/cookiecutter-r-data-analysis
- Owner: bdcaf
- License: mit
- Created: 2017-02-27T10:47:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-09T14:44:36.000Z (over 4 years ago)
- Last Synced: 2024-06-17T21:53:23.438Z (5 months ago)
- Topics: cookiecutter, makefile, r, workflow
- Language: TeX
- Size: 71.3 KB
- Stars: 18
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - bdcaf/cookiecutter-r-data-analysis - cookie cutter template for my r workflow (TeX)
README
R data analysis template
========================Over years I came up with a quite standardized template. Though it usually degraded to copying a number of files from previous projects. With this template I try to formalize this approach.
[cookiecutter](https://github.com/audreyr/cookiecutter) is a tool to template new project files and folder structures. It still seems quite active and has templates beyond a single language it seems a promising home for this task.
These templates also contain some sample code for my reference how to achieve typical tasks. The most code is written in R files and derivatives like `.Rmd` and `.Rnw`. But I also make use of `make` for building the project, and additionale shell utilities like `latexmk` and `pandoc`. At some future point I will provide a setup script - at the moment you will need to weed through dependencies manually.
Requirements
------------
Install `cookiecutter` command line: `pip install cookiecutter`Or with [homebrew](https://brew.sh/) `cookiecutter` command line: `brew install cookiecutter`
Usage
-----
Generate a new Cookiecutter template layout: `cookiecutter gh:bdcaf/cookiecutter-r-data-analysis`.
It creates a minimal project that can be run typing `make`.
Explore the `Readme.md` in the generated directory for more.If your `.cookiecutterrc` is configured a quicker start is:
`cookiecutter gh:bdcaf/cookiecutter-r-data-analysis project_name="This is Magic"`**Note**
Many functions used require that the project is a valid R package.
The slug must be a valid package name, therefore it must only consist of characters, numbers and `.`, also it must start with a character.
I wrote a simple replacement for spaces to dots, but for the rest you are on your own!Requirements
------------Besides `cookiecutter`s dependencies it uses `make`, a `perl` script for dependency discovery.
Obviously a working `R` installation is also required.
To have the automatic loading of code in `R` the `devtools` package is required.
For the creation of reports `knitr` is required.The exemplary work flow has plenty of dependencies. The main ones are:
- `R` with `knitr`, `pander`, `dplyr`, `ggplot` packages
- `pandoc` to convert into Word file
- `latex` for pdf generation
- `curl` to download the example dataLicense
-------
This project is licensed under the terms of the [MIT License](/LICENSE)