我一直在尝试将图像输出超链接到网站,但我在仔细阅读有关堆栈溢出的其他问题时遇到了麻烦
带有闪亮的可点击链接的 svg - 不可点击 https://stackoverflow.com/questions/37121767/svg-with-clickable-links-in-shiny-not-clickable
http://www.invisiblecompany.com/shiny%20parts/archives/2004/11/clickable-logo.php http://www.invisiblecompany.com/shiny%20parts/archives/2004/11/clickable-logo.php
http://www.leahkalamakis.com/add-an-image-to-your-sidebar-make-it-clickable/ http://www.leahkalamakis.com/add-an-image-to-your-sidebar-make-it-clickable/
标签不起作用
server.r
library(shiny)
library(png)
server <- shinyServer(function(input, output) {
output$image1 <- renderImage({
width<- "100%"
height<- "100%"
list(src = "www/logo.png",
contentType = "image/png",
width = width,
height = height,
)
}, deleteFile = FALSE)
output$text1 <- renderText({ "please help make the image hyperlinked" })
})
ui.r
library(shiny)
ui <- shinyUI(pageWithSidebar(
titlePanel(imageOutput("image1")),
sidebarPanel(
helpText( a("Click Here for the Source Code on Github!", href="https://github.com/Bohdan-Khomtchouk/Microscope",target="_blank"))
),
mainPanel(
tabsetPanel(
tabPanel("Instructions",textOutput("text1"))
))
))
您可以将 logo.png 替换为您想要的任何内容,我认为超链接会出现在服务器的列表中。