Wie kann ich in einer Shiny-App Daten zwischen Funktionen übertragen?
Ich habe eine glänzende App, in der server.r den folgenden Code enthält
shinyServer(function(input, output) {
data <- reactive(function() {
# some processing
df # dataframe with columns: name,date,count
})
output$plot1 <- reactivePlot(function() {
# boxplot based on df$count grouped by df$name
})
output$plot2 <- reactivePlot(function() {
# linegraph based on x=df$date, y=df$count grouped by df$name
})
})
Wie konstruiere ich es so, dass ich in den reaktiven Plots auf die df $ count usw. verweisen kann, die ich in der reaktiven Funktion 'data' erstellt habe
Prost