Package ggvis links R and modern Web techniques (html 5, canvas, SVG) available in most modern browsers. Similar to ggplot (the ggplot author is also one of the developers of ggvis and sees it as a newer version of ggplot.) Results are displayed in a web browser window instead of an R graphics windows. Interactive elements can be added. For RStudio users, graphics display in a viewer panel. Data manipulation and transformation are done in R, and the graphics are rendered in a web browser, using


world %>% ggvis(x = ~lifeem) displays a simple histogram) in your default web browser (%>% is a piping operator).

world %>% ggvis(x = ~lifeem, y=~gnpcap) displays a scatterplot.

Example: Interactive density

The example below adds interactivity

world %>% ggvis(x = ~lifeem) %>%
      adjust = input_slider(.1, 2, value = 1, step = .1, label = "Bandwidth adjustment"),
    kernel = input_select(
        c("Gaussian" = "gaussian",
          "Epanechnikov" = "epanechnikov",
          "Rectangular" = "rectangular",
          "Triangular" = "triangular",
          "Biweight" = "biweight",
          "Cosine" = "cosine",
          "Optcosine" = "optcosine"),
        label = "Kernel")  )