Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 844 Bytes

README.markdown

File metadata and controls

31 lines (22 loc) · 844 Bytes

C2PO R language bindings

C2PO is a grammar of graphics implementation inspired by Hadley Wickham's ggplot2 library. This R package uses the free online C2PO compiler and is limited to 1 MB of data. Plot specifications are compiled directly to an SVG string, which is returned:

library(c2po)

spec = list(
  data = data.frame(this=rnorm(5, 20), that=rnorm(5, 10))
, mapping = list(x = "this", y = "that")
, geom = "point"
)

c2po(spec) #=> "<svg ..."

This is an experimental package; the package API, plot specification syntax, and remote server may change or disappear at any time.

Install

Install from Github via the devtools package:

library(devtools)
devtools::install_github("c2po-r", username = "keminglabs")