R 在闪亮应用程序页面的标题栏中显示图标
我正在寻找某种方式,以便在标题栏中我的R 在闪亮应用程序页面的标题栏中显示图标,r,shiny,R,Shiny,我正在寻找某种方式,以便在标题栏中我的闪亮应用程序(“我的应用程序”)的名称前面显示一些快照,如下所示: library(shiny) ui = shinyUI( fluidPage(title = "My App", selectInput(inputId = "Pick", label = "Chose", choices = c('A', 'B', 'C'), selected = NULL, multiple = FALSE, s
闪亮应用程序(“我的应用程序”)的名称前面显示一些快照,如下所示:
library(shiny)
ui = shinyUI(
fluidPage(title = "My App",
selectInput(inputId = "Pick", label = "Chose", choices = c('A', 'B', 'C'), selected = NULL, multiple = FALSE, selectize = TRUE, size = NULL, width = 300))
)
server = function(input, output, session) {
}
shinyApp(ui = ui, server = server)
我尝试过在title参数中使用HTML
标记,如下所示,但是它没有显示任何内容
library(shiny)
ui = shinyUI(
fluidPage(title = div(img(src = 'https://guidetoiceland.is/image/389003/x/0/the-beautiful-waterfalls-of-south-iceland-seljalandsfoss-skogafoss-amp-gljufrabui-1.jpg', "My App")),
selectInput(inputId = "Pick", label = "Chose", choices = c('A', 'B', 'C'), selected = NULL, multiple = FALSE, selectize = TRUE, size = NULL, width = 300))
)
server = function(input, output, session) {
}
shinyApp(ui = ui, server = server)
如果有人能指引我走向正确的方向,我将不胜感激
谢谢,这应该可以:
library(shiny)
ui = shinyUI(fluidPage(
# Application title
titlePanel(
title =
tags$link(rel = "icon", type = "image/gif", href = "https://guidetoiceland.is/image/389003/x/0/the-beautiful-waterfalls-of-south-iceland-seljalandsfoss-skogafoss-amp-gljufrabui-1.jpg"),
"My App"
),
selectInput(
inputId = "Pick",
label = "Chose",
choices = c('A', 'B', 'C'),
selected = NULL,
multiple = FALSE,
selectize = TRUE,
size = NULL,
width = 300
))
)
server = function(input, output, session) {
}
shinyApp(ui = ui, server = server)
除非我误解了你的问题,这里是输出。您必须在浏览器中打开它才能看到它:
你好,我想你会在这里找到答案的。可能重复先前回答的问题你好Billy34,我可以按照您的链接。现在我可以在标题中显示图标了。谢谢,你好,李,你的解决方案没有显示任何图标。但无论如何,我还是访问了stackoverflow.com/questions/30096187/favicon-in链接-shiny@Bogaso代码对我来说很好。不知道为什么它不适用于you@Bogaso,我意识到我的代码只能在Firefox中使用。我没有在IE或EdgeHi Lee中测试过,是的,我同意。不过,不使用Chrome也可以。