Ich weiß, dass dies eine grundlegende Frage ist, aber ich bin wirklich neu bei Shiny ...SelectInput und wenn Schleife Plot R Shiny
Wie kann ich kombinieren plotlyOutput mit einer if-Schleife von einer SelectInput Box?
Ich meine etwas wie folgt aus:
vars <- data.frame(location = c("AP LIGUA",
"ESCUELA CHALACO"),
lat = c(-32.45,
-32.183333),
lon = c(-71.216667,
-70.802222)
)
selectInput(inputId = "myLocations", label = "Estación",
choices = vars$location),
if (vars$location=="AP LIGUA") {
plotlyOutput("apligua", height = "100%")
fluidRow(
DT::dataTableOutput("table")
)
}
Aber es funktioniert nicht.
Meine Vermutung: Ersetzen Sie "Vars $ location ==" AP LIGUA "' mit 'input $ myLocations ==" AP LIGUA "'. – Axeman
"Fehler: Objekt 'Eingabe' nicht gefunden" – NUForever