I have a bar plot which i want to display in R shiny based on one/multiple user input selection.But it gives an error and thereby doesn't display.The code is as below:-
Hi @ritm, I can't reproduce the error because you haven't shared the full dataset df3_machine_region.
But, I think the problem is that you are supplying a vector of values to ggplot while it expects a column name. The sum_as_hours is a column as well I guess?
Here is an example how to do this, with a dataset that's available in R
Hi @ginberg.Thanks a ton for the reply.I wanted to know one more thing which i am trying to figure out and that is how do i display the bar plot with all the values from the region input either without selecting all the input values or having some kind of an 'all' value which if selected will display the plot for all the values of region.Is it possible.
Sure, that's possible. I have updated the example for the first case. For the second one, you would need to add an option to the selectInput and use that new option in the reactive so it returns the full dataset. I leave that open for you ok?