R downloadablePlot Shining模块在启动时会破坏我的Shining应用程序
我有下面的R downloadablePlot Shining模块在启动时会破坏我的Shining应用程序,r,shiny,periscope,downloadableplot,R,Shiny,Periscope,Downloadableplot,我有下面的shinny应用程序,我想知道如何使用downloadablePlotshinny模块下载绘图。当我启动应用程序时,整个应用程序都崩溃了 library(shiny) library(periscope) ui <- fluidPage( plotOutput("plot"), downloadablePlotUI("object_id1", downloadtypes = c("
shinny
应用程序,我想知道如何使用downloadablePlot
shinny模块下载绘图。当我启动应用程序时,整个应用程序都崩溃了
library(shiny)
library(periscope)
ui <- fluidPage(
plotOutput("plot"),
downloadablePlotUI("object_id1",
downloadtypes = c("png", "csv"),
download_hovertext = "Download the plot and data here!",
height = "500px",
btn_halign = "left")
)
server <- function(input, output) {
output$plot<-renderPlot(plot(iris))
plotInput = function() {
plot(iris)
}
callModule(downloadablePlot,
"object_id1",
logger = ss_userAction.Log,
filenameroot = "mydownload1",
aspectratio = 1.33,
downloadfxns = list(png = plotInput()),
visibleplot = plotInput())
}
shinyApp(ui = ui, server = server)
库(闪亮)
图书馆(潜望镜)
ui将其作为参数传递时,请尝试删除plotInput
后面的括号
library(shiny)
library(periscope)
ui <- fluidPage(
plotOutput("plot"),
downloadablePlotUI("object_id1",
downloadtypes = c("png", "csv"),
download_hovertext = "Download the plot and data here!",
height = "500px",
btn_halign = "left")
)
server <- function(input, output) {
output$plot<-renderPlot(plot(iris))
plotInput = function() {
plot(iris)
}
callModule(downloadablePlot,
"object_id1",
logger = ss_userAction.Log,
filenameroot = "mydownload1",
aspectratio = 1.33,
downloadfxns = list(png = plotInput),
visibleplot = plotInput)
}
shinyApp(ui = ui, server = server)
库(闪亮)
图书馆(潜望镜)
你回答的ui解决了故障问题,我在这里接受。