An open API service indexing awesome lists of open source software.

https://github.com/kcf-jackson/sketch

Interactive sketches in R
https://github.com/kcf-jackson/sketch

javascript js r transpiler visualisation

Last synced: 6 months ago
JSON representation

Interactive sketches in R

Awesome Lists containing this project

README

          

---
output: rmarkdown::github_document
---

## R package `sketch`

[![Travis build status](https://travis-ci.org/kcf-jackson/sketch.svg?branch=master)](https://travis-ci.org/kcf-jackson/sketch)
[![Codecov test coverage](https://codecov.io/gh/kcf-jackson/sketch/branch/master/graph/badge.svg)](https://codecov.io/gh/kcf-jackson/sketch?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/sketch)](https://CRAN.R-project.org/package=sketch)

Creates interactive illustrations embeddable in R Markdown documents. The package compiles R code into JavaScript code by applying rewriting rules to the R AST. This allows users to develop JS-style visualisations using only the R syntax.

![](./man/figures/ast_transform.png)

### Installation

```{r, eval = FALSE}
# Stable version on CRAN
install.packages("sketch")

# For the development version
# install.packages("remotes")
remotes::install_github("kcf-jackson/sketch")
```

Visit the [website](https://kcf-jackson.github.io/sketch-doc) for [getting-started guide](https://kcf-jackson.github.io/sketch-doc/getting_started/), [tutorials](https://kcf-jackson.github.io/sketch-doc/tutorials/) and other documentation!