Reputation: 3505
Say I have one column of a data.frame that has a list of urls e.g
urlCol
http://mysite1.com
http://mysite2.com
How do I set that as a clickable link in renderDataTable?
TIA
Upvotes: 3
Views: 1441
Reputation: 30425
The url can be wrapped in an anchor tag:
library(shiny)
runApp(
list(ui = fluidPage(
dataTableOutput("myTable")
)
, server = function(input, output, session){
output$myTable <- renderDataTable({
data.frame(name = c("GOOGLE", "YAHOO")
, url = c("<a href=\"http://www.google.com\">http://www.google.com</a>"
, "http://yahoo.com")
)
})
})
)
Upvotes: 1