Creating a reactive dataframe with shiny apps
问题 I am trying to get this reactive to return a data frame that I can manipulate with plotly. avghour <- reactive({ result <- data.frame() start_date <- as.numeric(unlist(input$i6[1])) end_date <- as.numeric(unlist(input$i6[2])) mkw <- maxkwpeakdates[(maxkwpeakdates >= start_date & maxkwpeakdates <= end_date) & !is.na(maxkwpeakdates), ] mkw <- na.omit(mkw) mopkw <- maxonpeakkwdates[(maxonpeakkwdates >= x & maxonpeakkwdates <= y) & !is.na(maxonpeakkwdates), ] mopkw <- na.omit(mopkw) mkwhour <-