【发布时间】:2017-11-23 09:27:04
【问题描述】:
我正在我闪亮的应用程序中使用 R 包。 这是一个小例子:
library(shiny)
library(plotly)
ui <- fluidPage(
plotlyOutput("plot"),
verbatimTextOutput("event")
)
server <- function(input, output) {
# renderPlotly() also understands ggplot2 objects!
output$plot <- renderPlotly({
plot_ly(mtcars, x = ~mpg, y = ~wt)
})
output$event <- renderPrint({
d <- event_data("plotly_hover")
if (is.null(d)) "Hover on a point!" else d
})
}
shinyApp(ui, server)
如何通过例如“ResultDNA(27)”更改名称“newplot(27)”
谢谢。
【问题讨论】: