Create URL hyperlink in R Shiny?

前端 未结 2 1718
滥情空心
滥情空心 2020-12-06 00:33

My code:

library(shiny)
runApp(
  list(ui = fluidPage(
     uiOutput(\"tab\")
    ),
  server = function(input, output, session){
    url <- a(\"Google Ho         


        
相关标签:
2条回答
  • 2020-12-06 00:58

    You can use html tags whatever you want to tag

        tags$a(href="www.rstudio.com", "Click here!")
    ## <a href="www.rstudio.com">Click here!</a>
    
    0 讨论(0)
  • 2020-12-06 01:14

    By using paste, you're treating the url as a string. The function you want to use here is tagList:

    runApp(
      list(ui = fluidPage(
         uiOutput("tab")
        ),
      server = function(input, output, session){
        url <- a("Google Homepage", href="https://www.google.com/")
        output$tab <- renderUI({
          tagList("URL link:", url)
        })
      })
    )
    
    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题