Advertisement
Guest User

Untitled

a guest
May 24th, 2016
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. library(ggvis)
  2. library(dplyr)
  3. dat <- data.frame(fruit = rep(c("apple", "orange", "banana"), each=2),
  4. count = c(20, 40, 30, 70, 40, 50),
  5. site = rep(c("site_A", "site_B"), 3))
  6. dat %>% ggvis(~fruit,~count,fill=~site) %>% layer_bars() %>% add_legend("fill",title = "sizeoffruit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement