是否可以在Shiny app(主面板)中显示html文件?此HTML由SAS代码创建,但我想在Shiny App中显示.这不是一个小图像.这是HTML文件中的表格输出.
Html文件包含tabele,如下所示:

任何帮助将受到高度赞赏.
谢谢!Tinku
@MrFlick - 感谢您的电子邮件.fluidPage无法正常工作.它给出了以下错误消息:
ERROR: could not find function "fluidPage"
Run Code Online (Sandbox Code Playgroud)
titlePanel也无法正常工作.
注意 - 当我使用pageWithSidebar instaed的fluidPage和headerPanel而不是titlePanel时,它的工作正常.
MrF*_*ick 29
如果要在布局中包含其他文件的HTML内容,只需使用该includeHTML()功能即可.例如
shinyUI(fluidPage(
titlePanel("Included Content"),
mainPanel(
includeHTML("include.html")
)
))
Run Code Online (Sandbox Code Playgroud)
对于特定页面上"include.html"的内容应该是最低限度的.如果你需要让它更具动感,你可以做到
# ----- ui.R -----
shinyUI(fluidPage(
titlePanel("Uploading Files"),
mainPanel(
htmlOutput("inc")
)
))
# ----- server.R -----
shinyServer(function(input, output) {
getPage<-function() {
return(includeHTML("include.html"))
}
output$inc<-renderUI({getPage()})
})
Run Code Online (Sandbox Code Playgroud)
您可以使用您想要的任何逻辑来指定要加载的文件名.