Я пытаюсь получить вывод графика в selectInput,
ui:
selectInput("select", label = h3("Project Id"),
choices=list("WP1"= "correlation", "WP2"=25 , "WP3"=6,"WP4", "adapt"),
selected = 1),
hr(),
fluidRow(column(5, verbatimTextOutput("value"))
сервер:
output$value<-renderPlotly({input$select})
сейчас мой график ui:
fluidRow(
column(6,plotlyOutput(outputId="timeseries", height="400px")),
column(6,plotlyOutput(outputId="correlation", height="400px"))
)
сервер:
# Read data
stockdata <- read.csv("https://cdn.rawgit.com/plotly/datasets/master/stockdata.csv")
# Create dates
stockdata$Date <- as.Date(stockdata$Date)``
# Reshape
ds <- reshape2::melt(stockdata, id = "Date")
ds <- filter(ds, variable != "GSPC")``
# Set some colors
plotcolor <- "#F5F1DA"``
`` papercolor <- "#E3DFC8"``
# Plot time series chart
output$timeseries <- renderPlotly({``
p <- plot_ly(source = "source") %>% ``
add_lines(data = ds, x = ~Date, y = ~value, color = ~variable, mode = "lines", line = list(width = 3))
Я не могу связать WP1 с этим выводом графика.