【问题标题】:Logo / Image is not getting displayed on shinyapps.io徽标/图像未在 shinyapps.io 上显示
【发布时间】:2019-04-03 04:39:44
【问题描述】:

我的徽标在 R shiny 本地显示,但是当我将我的应用程序部署到 shinyapps.io (Check the app here) 时,徽标显示一张空白图片。有人可以帮我吗?

空白徽标

我的代码

library(dplyr)
library(shiny)
library(shinythemes)
library(rpivotTable)

#UI
ui = fluidPage(img(src='capture5.png',  height = 70, width = 120),  
img(src='capture6.png',  height = 70, width = 120), 
fluidRow( rpivotTableOutput("pivot")))


#Server
server = function(input, output, session) {reactive({
    mtcars %>% select(cyl, carb, vs, mpg) %>% group_by(carb,vs ) %>% summarise(mpg=sum(mpg))}) 


  output$pivot <- renderRpivotTable(  rpivotTable::rpivotTable(mtcars, rows = c( "vs"),cols=c("carb"), vals =  "mpg", aggregatorName = "Sum",                                rendererName =  "Table",                                                  width="50%", height="550px"))}


shinyApp(ui = ui, server = server)

【问题讨论】:

  • 服务器响应404错误,表示它不知道图像在哪里,请确保它在www文件夹中
  • Wilmar,我相信这是该问题的后续,专门针对部署到 shinyapps.io。上一个问题涉及本地闪亮实例。

标签: r shiny dashboard shinydashboard shinyapps


【解决方案1】:

我在我这边进行了测试,似乎能够查看图像。我按照下图中的程序进行操作。请确认这是否是您所做的,或者这是否适合您?

选择发布图标后,我确保选中了 2 张图片(默认情况下),然后发布了应用程序。我将图像文件保存在 www 文件夹中。

【讨论】:

  • 谢谢伙计,我使用代码和密码来发布我的应用程序,因为由于不可预见的原因,您显示的方法在我的 R 工作室中不起作用。再次感谢您的努力:)
  • 嗨,Eli,我现在有一个新情况,你能看看下面的链接吗,谢谢。 stackoverflow.com/questions/53100944/…
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-06-10
  • 2021-04-10
  • 2018-08-02
  • 2011-03-31
  • 1970-01-01
  • 1970-01-01
  • 2016-12-26
相关资源
最近更新 更多