I\'m looking into building a shiny app with ggvis. For this I\'m using a small dataset called \"company\". It contains employee data where each line represents and employee.
First of all you need to melt your data.frame like this:
library(reshape2)
company <- melt(company, measure.vars=c('Role','Age','Sex'))
And then the following worked for me:
#Barcharts - Age
company %>% ggvis(~value, opacity := 0.8) %>%
#use filter to pick only the category you want
filter(variable == eval(input_select(choices=c('Role','Age','Sex')))) %>%
layer_bars()
I cannot upload the interactive version but the plot looks like this:

And you can pick the category you like