Thanks jcblum. I will go through the tutorials more carefully than I have.
But, upon thinking about and looking more at Travis' working code, I still don't see my issue addressed: I want to have the ui display driven by a user-specified address. So the user needs a text box to type in something like "1600 Pennsylvania Ave, Washington, DC", I need that text to be programmatically accessible as a character string input to a mapping function in my server. As Travis showed me, it seems that I'm allowed to access that input only within a renderText function, which can only be used for ui output.
Very concretely, the following code snippet works fine (if you have a google maps api code):
library(shiny)
library(googleway)
load("~/apikey.RData")
ui <- fluidPage(google_mapOutput("map"))
server <- function(input, output, session){
api_key <- apikey
location = "1600 Pennsylvania Ave NW, Washington, DC 20500"
df = google_geocode(location,key=apikey)
output$map <- renderGoogle_map({
google_map(key = api_key, location = as.numeric(df$results$geometry$location))
})
}
shinyApp(ui, server)
How do I replace the hard-coded location string above with user-input from a text box? Is it possible within Shiny?