Home

Awesome

rVega: An R wrapper for Vega

Created by Thomas Reinholdsson (reinholdsson@gmail.com).

Shiny demo: http://glimmer.rstudio.com/reinholdsson/rVega-treemap/.

More about Vega: http://trifacta.github.com/vega/.

Installation

devtools::install_github("metagraf/rVega")

Examples

library(rVega)
treemap(1:26, letters)

Demo: http://glimmer.rstudio.com/reinholdsson/rVega-demo-1/

Geopath

geopath(...)  # to be updated

Demo: http://glimmer.rstudio.com/reinholdsson/rVega-demo-2/

Use with Shiny

server.R

library(rVega)
shinyServer(function(input, output) {
    output$plot <- renderVega({
        treemap(1:26, letters)
    })
})

ui.R

library(rVega)
shinyUI(bootstrapPage(
    vegaOutput("plot")
))

See also