I have a data frame (df) like this
Block RTreg RTrnd
1 Block1 0.0000 862.0707
2 Block2 667.2081 770.4315
3 Block3 645.4730 696.0200
4 Block4 674.5200 659.4765
5 Block5 651.4295 633.7333
and I used this code for box plot
library(reshape2)
df.long<-melt(df)
ggplot(df.long,aes(Block,value,fill=variable))+
geom_bar(stat="identity",position="dodge")
same code I was trying to run with R shiny based on the user input, like input$show_vars3 will be Block1,Block4.... and $show_vars4 will be RTrnd, RTreg
output$plot7 <- renderPlot({
df.long<-melt(c(input$show_vars3,input$show_vars4))
ggplot(df.long,aes(input$show_vars3,value,fill=names(input$show_vars4)))+geom_bar(stat="identity",position="dodge")
There is no plot were generated based on the code
Where I am missing ?