process.vignette: Convert vignettes into Jupyter notebooks.

Description Usage Arguments Details

Description

process.vignette converts R markdown, Sweave and knitr vignettes into Jupyter notebook format and automatically produces a Dockerfile for running the notebook in Docker virtual environment.

Usage

1
process.vignette(filename)

Arguments

filename

File name of the R documentation (.Rmd or .Rnw) to be converted. Absolute path has to be prepended if the file is not in the working directory. The file extension must be included in the file name.

Details

The function expects as input the file name of the .Rmd or .Rnw documentation that needs to be converted to Jupyter notebook format. Absolute path has to be prepended if the file is not in the working directory. The file extension must be included in the file name.

R markdown (.Rmd) vignettes are first rendered to Markdown Github and subsequently converted with the notedown command line utility to .ipynb format. The produced Jupyter notebook is scanned for dependencies using get.dependencies function and an R script packages.R is produced. packages.R and the Jupyter notebook are used to make a Docker image for the vignette.

Note, however, that the Docker image has to be built first from the produced Dockerfile. All generated files, i.e. Jupyter notebook, packages.R and Dockerfile are written in the same directory where the input file is located. In order to build a Docker image for running the vignette you don't need IPython Notebook installed on your machine. If you installed Docker, simply run in command line

$ docker build -t imagename .

in the same directory as the Dockerfile. After building the Docker image for your Jupyter notebook, check the operating system-specific commands for running Jupyter notebooks in Docker containers on the following web page https://hub.docker.com/r/vladkim/rnaseq/

Similarly, Sweave and knitr vignettes are compiled to a TeX file, which is in turn converted to Markdown with pandoc. The remaining processing steps are identical to those for R markdown vignettes.


vladchimescu/RdocsJupyter documentation built on May 3, 2019, 6:15 p.m.