Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(ggvis)
- library(dplyr)
- dat <- data.frame(fruit = rep(c("apple", "orange", "banana"), each=2),
- count = c(20, 40, 30, 70, 40, 50),
- site = rep(c("site_A", "site_B"), 3))
- dat %>% ggvis(~fruit,~count,fill=~site) %>% layer_bars() %>% add_legend("fill",title = "sizeoffruit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement