【发布时间】: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