selectinput

addlegend R Leaflet-based-on-user-input

柔情痞子 提交于 2020-02-08 02:31:07
问题 I am using Shiny's varSelectInput function to display a map with R Leaflet from spatialpolygondataframe, so that by selecting a variable of the object the map of the corresponding variable is drawn and I changed its color. For this I have generated a reactive object of the ColorBin function of R leaflet from conditional varSelectInput. All this when rendering the map works correctly and consequently the map is painted, updating the color and the title of the legend. However, when deploying

Problem passing variable names via selectInput() in R/Shiny

筅森魡賤 提交于 2020-01-16 18:22:33
问题 I'm building a shinyapp where I am passing variable names as arguments to the server with the selectInput() widget. The following static example illustrates the plot that I want displayed: g <- ggplot(d, aes(y, fill = var1, colour = var1)) + geom_density(alpha=.2) Just to be clear, here is an image of the above plot What I want to do in my shinyapp is to separate the plotted distributions by different variables that the user can choose via selectInput(). But when I substitute var1 in the