我想在R Shiny用户界面上放置一个HTML链接(实际上它重定向到file:// ...),以便最终用户只需单击它并转到Chrome中另一个选项卡中的该页面即可.有没有办法做到这一点?我应该放在哪里?在ui.R文件或server.R文件中?
我在这里找到一个帖子:http://www.r-bloggers.com/more-explorations-of-shiny/但我不知道如何使用该a()功能......
注意:我知道如何做到这一点(请参阅下面的评论),但由于我重定向到file://目的地,链接将无法正常工作.有解决方案吗
谢谢!
这样的事情应该有效:
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>
Run Code Online (Sandbox Code Playgroud)