knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
library(jsvm)

# Clear out README figure files before rerendering
readme_figs <- Sys.glob(file.path("man", "figures", "README-*"))
file.remove(readme_figs)

jsvm

jsvm is my personal toolbelt package with functions that I often tend to use or had fun making for some specific purpose.

Installation and external dependencies

Install the package from github, using devtools:

# install.packages("devtools")
devtools::install_github("janusvm/jsvm")

Some functions rely on one or more external programs. Not having these programs will not hinder the installation of the package, but some functionality will be missing. The current dependencies are:

Exported functions

Examples

expr2tikz creates a tikz string, that (when using the LaTeX package tikz-qtree) produces a graph representing the abstract syntax tree of an expression, optionally saving the figure as either a pdf, svg, or png.

filename <- file.path("man", "figures", "README-expr2tikz.svg")
expr2tikz(y <- x * 2, filename)
knitr::include_graphics(filename)

More functions and examples to come...



janusvm/jsvm documentation built on May 28, 2019, 9:39 a.m.