list("Map1" = "Map1",
"Map2" = "Map2"))
And then on the server side, you can fetch the appropriate object:
output$mapPlot <- renderPlot({
if (input$variable == "Map1")
data <- raster("file1.asc")
else if (input$variable == "Map2")
data <- raster("file2.asc")
levelplot(data, margin=FALSE, par.settings=GrTheme)
})
BTW, the reason I use an if-else statement, instead of doing something like this:
data <- raster(input$variable)
is because this would allow users to potentially read any file on your system, by simply modifying the input value in the web browser.
-Winston