[英]Is there a way to display a .gif file in R shiny?
I simply want to render a.gif file in an R shiny app.我只是想在 R shiny 应用程序中呈现一个 .gif 文件。 Is there a simple way to do this?有没有一种简单的方法可以做到这一点? I was unable to find a solution in the documentation.我无法在文档中找到解决方案。
Try this:尝试这个:
library(shiny)
ui <- fluidPage(
img(src="sample.gif", align = "left",height='250px',width='500px')
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
Make sure that the app.R has a folder called www where the gif is saved.确保 app.R 有一个名为 www 的文件夹,其中保存了 gif。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.