A R package for literate programming.
This package can be used to create reports and manuscripts with embedded programming code where the code can be evaluated by the script language or a diagram, charting or diagramming tool and the output will be embedded in the final manuscript.
This is a small scale alternative to Sweave, Rmarkdown, Knitr etc. It is essentially a wrapper for the pantcl which does not need an installed version of pandoc or any other R package.
It allows the embedding for the following programming languages and tools:
Filter documentation:
- filter-abc - visualize ABC music notation
- filter-cmd - execute shell scripts for instance Lilypond music scripts, GraphViz scripts, Python, Lua, R scripts, sqlite3 scripts, or code for languages like C, C++, Go, Rust, V etc.
- filter-dot - GraphViz dot filter
- filter-emf - Jasspa MicroEmacs macros filter
- filter-eqn - visualize mathematical equations using eqn2graph, see here Guide for typesetting using eqn
- filter-julia - statistical language Julia (slow for embedding, use R instead) Julia Website
- filter-kroki - visualize diagram code using the kroki webservice
- filter-mmd - visualize diagram code using the mermaid command line tool
- filter-mtex - visualize mathematical equations using LaTeX
- filter-pic - visualize diagram and flowcharts using the PIC language
- filter-pik - visualize diagram code or flowcharts uing pikchr or fossil
- filter-pipe - embed R, Python or Octave code or plots into Markdown
- filter-puml - embed PlantUML code
- filter-rplot - embed R plots
- filter-sqlite - embed Sqlite3 SQL database statements
- filter-tcl - embed Tcl statements
- filter-tcrd - embed Tcl music chords.
- filter-tdot - embed Tcl GraphViz diaragrams
- filter-tsvg - embed Tcl created SVG code
There are essentially three commands:
pantcl
- converting Rmarkdown documents with embedded code to HTMLptangle
- extract programming code into script files from the Markdown documentpangui
- simple graphical interface to edit abc music, Graphviz dot, Eqn equations, Mermaid diagrams, Pikchr and Pic code, Plantuml code, R-plots and Tcl-svg or Tcl-dot code
Below you see an image of the graphical tool:
To install this package you need only an installed R instance and the remotes library.
library(remotes)
remotes::install_github("https://github.com/mittelmark/pantcl4r")
Author: Detlef Groth, University of Potsdam, Germany
License: MIT License see the file LICENSE for details.
In case of bugs and suggestions, use the issues link on top.