How to create an interactive hyperlink in a brilliant application?

I am creating a brilliant application in which I want to create hyperlinks interactively. I know how to add a link to ui.r using (), but how can I let my brilliant applications change this link interactively?

Does anyone have an idea on how to do this?

+5
source share
1 answer

You can use renderUI to dynamically display HTML:

 library(shiny) runApp( list(ui = fluidPage( selectInput('website', 'Choose a website' , list(bbc = "http://www.bbc.co.uk" , google = "http://www.google.com" , cnn = "http://www.cnn.com") ) , htmlOutput("mySite") ) ,server = function(input, output, session){ output$mySite <- renderUI({ tags$a(href = input$website, input$website) }) }) ) 
+4
source

Source: https://habr.com/ru/post/1202459/


All Articles