无法在shinyapps.io

时间:2018-02-22 19:15:46

标签: r shiny shiny-server

以下是shiny.server中的一段代码。它工作得很好,并在本地计算机中加载图像。但每当我尝试在shinyapps.io服务器上托管该应用程序时,图像都不会显示出来。请指出问题的解决方法以及如何解决问题?

output$tb<-renderUI({
  if(is.null(data()))
    h5("developped by Kinsuk ",tags$img(src='shinysnap.jpg',height=350,width=600))
  else
    tabsetPanel(tabPanel("About File",tableOutput("filedf")),tabPanel("Data",tableOutput("table")),tabPanel("Summary",tableOutput("summ")),tabPanel("Centered Variables",dataTableOutput("MeanC")))

})

2 个答案:

答案 0 :(得分:0)

尝试将图像文件从“.jpg”转换为“.png”。它可能会奏效。 我有类似的问题,我通过将jpg图像转换为png格式来解决它。

答案 1 :(得分:0)

您可能要仔细检查图像名称的拼写。

我有一个名为(例如)iMage.jpg的图像,以及一个路径image.jpg。在本地,它找到了正确的图像(在www文件夹中),但是在Shinyapps.io上,它可能不区分大小写。