徽标/图像未在Shinyapps.io上显示 [英] Logo / Image is not getting displayed on shinyapps.io

查看:75
本文介绍了徽标/图像未在Shinyapps.io上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的徽标正在本地显示在R Shiny 上,但是当我将我的应用程序部署到 shinyapps.io (

我的代码

 库(dplyr)图书馆(闪亮)图书馆(shinythemes)库(数据透视表)#UIui = fluidPage(img(src ='capture5.png',高度= 70,宽度= 120),img(src ='capture6.png',高度= 70,宽度= 120),fluidRow(rpivotTableOutput("pivot")))#服务器服务器=功​​能(输入,输出,会话){反应性({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,服务器=服务器) 

解决方案

我站在一边测试,似乎能够查看图像.我按照下图中的过程进行操作.请确认这是您所做的还是对您有用?

选择发布图标后,我确保检查了2张图像(默认情况下它们已选中),然后发布了该应用程序.我将图像文件保存在www文件夹中.

My logo is getting displayed locally on R shiny, but when i deploy my app to shinyapps.io (Check the app here), the logo shows a blank picture. Can someone please help me out?

The blank logo

My code

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)

解决方案

I tested on my side and seemed able to view images. I followed the procedure in the image below. Please confirm if this is what you did or whether this perhaps works for you?

After selecting the publish icon I made sure that the 2 images were checked (they were by default) and then published the app. I saved the image files in the www folder.

这篇关于徽标/图像未在Shinyapps.io上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆