tests/specs/boxplot.r

library(ggvis)

mtcars %>%
  ggvis(~cyl, ~mpg) %>%
  layer_boxplots() %>%
  save_spec("boxplot/boxplot-continuous.json")

mtc <- mtcars
mtc$cyl <- factor(mtc$cyl)
mtc %>%
  ggvis(~cyl, ~mpg) %>%
  layer_boxplots() %>%
  save_spec("boxplot/boxplot-categorical.json")


dat <- data.frame(x = c('a','a','a','b','b','b'), y = c(1:3, 2:4))
dat %>%
  ggvis(x = ~x, y = ~y) %>%
  layer_boxplots() %>%
  save_spec("boxplot/boxplot-no-outliers.json")
rpruim/ggvis2 documentation built on May 28, 2019, 2:34 a.m.