Rmdawn: a Python package for programmatic R markdown workflows¶
Create R markdown (Rmd) files from YAML, code, and markdown files.
Extract YAML, code, and markdown files from R markdown files.
The rmdawn
Python package consists of 2 shell commands and
functions:
rmdawn
, which concatenates input files to output an R Markdown (Rmd) file.rmdusk
, which extracts 1) a YAML file, 2) Python or R scripts and 3) Markdown (md) files from Rmd files.
Installation¶
pip install rmdawn
or clone the repo, e.g.
git clone https://github.com/marskar/rmdawn
and install locally
using setup.py (python setup.py install
) or pip
(pip install .
).
Basic usage: terminal¶
Creating an R markdown file with the rmdawn
shell command¶
rmdawn header.yml README.md scrape.py plot.R notes.txt > example.Rmd
Extract YAML, markdown, and code files from R markdown files with the rmdusk
shell command¶
rmdusk example.Rmd