Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

put a HTML link to the R Shiny application

Tags:

r

shiny

I want to put a HTML link (actually it redirects to file://...) on the R Shiny user interface, so that end-users can just click it and go to that page in another tab in Chrome. Is there a way to do that? Where shall I put? In the ui.R file or in the server.R file?

I find a post here: http://www.r-bloggers.com/more-explorations-of-shiny/ but I am not sure how to use the a() function...

Note: I know how to do that (see my comments below), but since I am redirecting to a file:// destination, the link won't work. Any solutions?

Thanks!

like image 734
alittleboy Avatar asked Jul 25 '13 01:07

alittleboy


1 Answers

Something like this should work:

doc <- tags$html(
   tags$body(
    a(href="http://www.lalala.com"))
)
cat(as.character(doc))

<html>
  <body>
    <a href="http://www.lalala.com"></a>
  </body>
</html>
like image 67
agstudy Avatar answered Oct 19 '22 18:10

agstudy