gpt4 book ai didi

r - 在最新的 Shiny 中,renderDataTable 中的 html 渲染代码中断

转载 作者:行者123 更新时间:2023-12-02 15:40:39 26 4
gpt4 key购买 nike

下面的代码曾经运行良好,直到我升级了 Shiny 的。现在它只打印出 html 文本。不将其呈现为 html

ui.R

dataTableOutput("网格")

服务器.R

testLinks<-function(){
serial<-(1:2)
websites<-c("www.google.com","www.yahoo.com")
Link<-paste0("<a href=\"",websites,"\" target=\"_blank\">", websites,"</a>")
df<-data.frame(serial, websites,Link)
df
}

output$grid<-renderDataTable(testLinks())

现在它只是将链接呈现为 html 文本

在升级之前,它用于将它们呈现为 html 链接。

任何帮助,非常感谢。

最佳答案

renderDataTable 中的转义参数需要设置为 FALSE。我假设此版本中的默认值已更改。导致我的代码被破坏。通过将转义参数显式设置为 FALSE,此问题已得到修复。

关于r - 在最新的 Shiny 中,renderDataTable 中的 html 渲染代码中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28269585/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com