参考:how to create a hyperlink interactively in shiny app?

    1. library(shiny)
    2. runApp(
    3. list(ui = fluidPage(
    4. selectInput('website', 'Choose a website'
    5. , list(bbc = "http://www.bbc.co.uk"
    6. , google = "http://www.google.com"
    7. , cnn = "http://www.cnn.com")
    8. )
    9. , htmlOutput("mySite")
    10. )
    11. ,server = function(input, output, session){
    12. output$mySite <- renderUI({
    13. tags$a(href = input$website, input$website)
    14. })
    15. })
    16. )

    截图_20210110215211.gif